Visibilidad o No de un Tree

Visibilidad o No de un Tree

Postby Mike Serra » Wed Nov 25, 2009 10:45 am

Buenos días foro, tengo un Arbol declarado asi:

Code: Select all  Expand view

    oTree := TTreeView():Redefine( 601, oFolder:adialogs[1] )
        oTree:bChanged := { |oTree,oItem| MyClick( oTree:GetSelected(),@aoGets,@aoChecks ) }
    oTree:SetColor(rgb(0,0,0),rgb(255,255,255))
    oImageList := TImageList():New(32,32)              // imagelist items are zero-based!

        oImageList:Add( TBitmap():Define( "FOLDER_OPEN",, oDlg ),TBitmap():Define( "FOLDER_OPEN",, oDlg ) )
        oImageList:Add( TBitmap():Define( "FILE",, oDlg ),TBitmap():Define( "FILE",, oDlg ) )
        oImageList:Add( TBitmap():Define( "FILEUP",, oDlg ),TBitmap():Define( "FILEUP",, oDlg ) )
        oImageList:Add( TBitmap():Define( "FILE_CHECK",, oDlg ),TBitmap():Define( "FILE_CHECK",, oDlg ) )
 


es desde recursos y esta en un folder, quiero segun una configuración que se vea el arbol o no, lo he intentado asi, sin éxito:

Code: Select all  Expand view

       if oUser:VisibilidadArbol = "Si"
       oTree:Show()
       else
       oTree:Hide()
       end if
 


¿Sabéis cómo hacerlo?

Muchas Gracias y Saludos,
Mike Serra
 
Posts: 297
Joined: Fri Apr 14, 2006 5:52 pm
Location: Córdoba (España)

Re: Visibilidad o No de un Tree

Postby Mike Serra » Wed Nov 25, 2009 10:48 am

Solucionado!, el problema es que la condición había que ponerla en el ON PAINT
Mike Serra
 
Posts: 297
Joined: Fri Apr 14, 2006 5:52 pm
Location: Córdoba (España)


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 149 guests