Visibilidad o No de un Tree

Post Reply
Mike Serra
Posts: 287
Joined: Fri Apr 14, 2006 5:52 pm
Location: Córdoba (España)

Visibilidad o No de un Tree

Post by Mike Serra »

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

Code: Select all

    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

       if oUser:VisibilidadArbol = "Si"
       oTree:Show()
       else
       oTree:Hide()
       end if
 
¿Sabéis cómo hacerlo?

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

Re: Visibilidad o No de un Tree

Post by Mike Serra »

Solucionado!, el problema es que la condición había que ponerla en el ON PAINT
Post Reply