Thiagodb Posted August 9, 2005 Report Share Posted August 9, 2005 Por favor ... alguem sabe como usar a classe TImageList??? Tento usa-la na classe TTreeView() oImageList := TImageList():New(16,16) oBmp1 := TBitmap():Define( ,"fld_close.bmp",oWnd) oBmp2 := TBitmap():Define( ,"fld_open.bmp" ,oWnd) oImageList:Add( oBmp1, oBmp2 ) oTree:SetImageList( oImageList ) mas só aparece a imagem de 1º BMP, e em todos os nÃveis da Tree. Editado por - Thiagodb on 09/08/2005 10:01:13 Quote Link to comment Share on other sites More sharing options...
Thiagodb Posted August 9, 2005 Author Report Share Posted August 9, 2005 Por favor ... alguem sabe como usar a classe TImageList??? Tento usa-la na classe TTreeView() oImageList := TImageList():New(16,16) oBmp1 := TBitmap():Define( ,"fld_close.bmp",oWnd) oBmp2 := TBitmap():Define( ,"fld_open.bmp" ,oWnd) oImageList:Add( oBmp1, oBmp2 ) oTree:SetImageList( oImageList ) mas só aparece a imagem de 1º BMP, e em todos os nÃveis da Tree. Editado por - Thiagodb on 09/08/2005 10:01:13 Quote Link to comment Share on other sites More sharing options...
Thiagodb Posted August 9, 2005 Author Report Share Posted August 9, 2005 Por favor ... alguem sabe como usar a classe TImageList??? Tento usa-la na classe TTreeView() oImageList := TImageList():New(16,16) oBmp1 := TBitmap():Define( ,"fld_close.bmp",oWnd) oBmp2 := TBitmap():Define( ,"fld_open.bmp" ,oWnd) oImageList:Add( oBmp1, oBmp2 ) oTree:SetImageList( oImageList ) mas só aparece a imagem de 1º BMP, e em todos os nÃveis da Tree. Editado por - Thiagodb on 09/08/2005 10:01:13 Quote Link to comment Share on other sites More sharing options...
gilmer Posted August 9, 2005 Report Share Posted August 9, 2005 Favor enviar um pequeno exemplo. Quote Link to comment Share on other sites More sharing options...
Thiagodb Posted August 9, 2005 Author Report Share Posted August 9, 2005 Ai vai o exemplo do problema: ******************* function Main() Local oWnd,oImageList,oBmp1,oBmp2,oTree oWnd := TWindow():New( 50 , 150 , 577.5 , 457.5 ,"TESTE" , , , , , ,.F. ,.F. ,"N/W" , , ,"NONE" , , ,.T. ,.F. , .T. ) //New( nTop, nLeft, nBottom, nRight , cTitle ,nStyle,oMenu,oBrush,oIcon,oParent,lVScroll,lHScroll,nClrFore,nClrBack,oCursor,cBorder,lSysMenu,lCaption,lMin, lMax, lPixel ) CONSTRUCTOR oImageList = TImageList():New(16,16) oBmp1 = TBitmap():Define( ,"fld_close.bmp", oWnd ) // imagem .bmp (16X16 pix) qdo estiver a TREE estiver fechada oBmp2 = TBitmap():Define( ,"fld_open.bmp" , oWnd ) // imagem .bmp (16X16 pix) qdo estiver a TREE estiver aberta oImageList:Add( oBmp1, oBmp2 ) oTree := TTreeView():New( 01 , 01 , oWnd, , , .T. , .F. , 300 , 500 , ) // New( nTop, nLeft, oWnd,nClrFore,nClrBack, lPixel, lDesign, nWidth, nHeight,cMsg ) *--------------------Cria uma nova matrix Classificada por SISTEMA + PAI-----------------------* oTree:Add("TESTE 1") oTree:Add("TESTE 2") oTree:SetImageList( oImageList ) return nil ******************* Editado por - Thiagodb on 11/08/2005 18:03:53 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.