I did this test but it doesn't work because the oExbar doesn't refresh
at init the taskpanel n. 2 is not showed
explbar.prg modified
- Code: Select all Expand view
- #include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
local oWnd, oExBar, oPanel1, oPanel2, oPanel3, oPanel4
local aSections := {{ "One", "..\bitmaps\32x32\people.bmp",.t. },;
{ "Two", "..\bitmaps\32x32\case.bmp",.f. },;
{ "Three", "..\bitmaps\32x32\graphics.bmp",.t. },;
{ "Four", "..\bitmaps\32x32\people.bmp",.t. } }
local bClick := { | o | change_array(@aSections,oExBar) }
DEFINE WINDOW oWnd TITLE "FWH Class TExplorerBar"
oWnd:SetSize( 350, 600 )
oExBar = TExplorerBar():New()
oPanel1 = oExBar:AddPanel( "One", "..\bitmaps\32x32\people.bmp" )
oPanel1:AddLink( "Add Panel 2", bClick, "..\bitmaps\16x16\additem.bmp" )
If aSections[2][3]
oPanel2 = oExBar:AddPanel( "Two", "..\bitmaps\32x32\case.bmp" )
Endif
oPanel3 = oExBar:AddPanel( "Three", "..\bitmaps\32x32\graphics.bmp" )
oPanel4 = oExBar:AddPanel( "Four" )
oWnd:oClient = oExBar
ACTIVATE WINDOW oWnd
return nil
//----------------------------------------------------------------------------//
function change_array(aSections,oExBar)
aSections[2][3]:= .t.
oExBar:refresh()
return nil
//----------------------------------------------------------------------------//