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