#include "FiveWin.ch"
STATIC ODLG,oExBar
Function TestDialog()
DEFINE DIALOG oDlg ;
SIZE 800,600 ;
TITLE "Test ExplorerBar on a Dialog"
oExBar:=TExplorerBar():New(0, 0, 112, 800 , oDlg)
ACTIVATE DIALOG oDlg ON INIT BarExplorer(oExBar)
return nil
FUNCTION BarExplorer(oExBar)
local oPanel1, oPanel2, oPanel3, oPanel4
local bClick := { | o | MsgInfo( o:GetText() ) }
oPanel1:= oExBar:AddPanel( "Panel 1", , 200)
oPanel1:lSpecial:=.T.
oPanel2 = oExBar:AddPanel( "Panel 2", , 200)
oPanel3 = oExBar:AddPanel( "Panel 3", , 100)
oPanel4 = oExBar:AddPanel( "Panel 4", , 200)
oPanel5 = oExBar:AddPanel( "Panel 5", , 100)
oPanel6 = oExBar:AddPanel( "Panel 6", , 200)
oPanel1:AddLink( "First item", bClick, "additem" )
oPanel1:AddLink( "Second item", bClick, "copy" )
oPanel2:AddLink( "First item", bClick, "adddbf" )
oPanel2:AddLink( "Second item", bClick, "delete" )
oPanel2:AddLink( "Third item", bClick, "envelope" )
oPanel2:AddLink( "Fourth item", bClick, "envelope")
oPanel3:AddLink( "First item", bClick, "adddbf" )
oPanel3:AddLink( "Second item", bClick, "delete" )
oPanel3:AddLink( "Third item", bClick, "envelope" )
oPanel3:AddLink( "Fourth item", bClick, "envelope")
oPanel4:AddLink( "First item", bClick, "adddbf" )
oPanel4:AddLink( "Second item", bClick, "delete" )
oPanel4:AddLink( "Third item", bClick, "envelope" )
oPanel4:AddLink( "Fourth item", bClick, "envelope")
oPanel5:AddLink( "First item", bClick, "adddbf" )
oPanel5:AddLink( "Second item", bClick, "delete" )
oPanel5:AddLink( "Third item", bClick, "envelope" )
oPanel5:AddLink( "Fourth item", bClick, "envelope")
oPanel6:AddLink( "First item", bClick, "adddbf" )
oPanel6:AddLink( "Second item", bClick, "delete" )
oPanel6:AddLink( "Third item", bClick, "envelope" )
oPanel6:AddLink( "Fourth item", bClick, "envelope")
oDlg:oleft= oExBar
RETU NIL
TimStone wrote:Antonio,
I posted a problem with the calendar class, and a complete fix was provided several weeks ago. I'm sorry that was not added to this build. You might want to review the thread on it.
Thanks.
Tim
James Bott wrote:Antonio,
One nice improvement would be for the panels to automatically resize themselves based on how many items they contain. Of course, this means the following panels have to move up to fill the space.
This is how Windows Explorer's panels work.
Regards,
James
#include "FiveWin.ch"
#include "Splitter.ch"
STATIC oDlg,oExBar
Function TestDialog()
Local aBrowse, oGrid ,nSplit,oSplit
nSplit :=112
DEFINE DIALOG oDlg ;
SIZE 800,600 ;
TITLE "Test ExplorerBar on a Dialog"
oExBar:=TExplorerBar():New(0, 0, nSplit, 800 , oDlg)
USE CUSTOMER
oGrid := TXBrowse():New( oDlg )
oGrid:nTop := 00
oGrid:nLeft := nSplit+2
oGrid:nBottom := oDlg:nBottom
aBrowse := { { { || CU->FIRST }, i18n("First"), 150, 0 },;
{ { || CU->LAST }, i18n("Last"), 150, 0 },;
{ { || CU->STREET}, i18n("Street"), 150, 0 },;
{ { || CU->CITY } , i18n("City"), 150, 0 } }
FOR i := 1 TO Len(aBrowse)
oCol := oGrid:AddCol()
oCol:bStrData := aBrowse[ i, 1 ]
oCol:cHeader := aBrowse[ i, 2 ]
oCol:nWidth := aBrowse[ i, 3 ]
oCol:nDataStrAlign := aBrowse[ i, 4 ]
oCol:nHeadStrAlign := aBrowse[ i, 4 ]
NEXT
oGrid:SetRDD()
oGrid:CreateFromCode()
oDlg:oClient := oGrid
@ 00, nSplit SPLITTER oSplit ;
VERTICAL ;
COLOR RGB(143,172,230) ;
PREVIOUS CONTROLS oExBar;
HINDS CONTROLS oGrid;
SIZE 1, oDlg:nBottom PIXEL ;
OF oDlg ;
UPDATE
ACTIVATE DIALOG oDlg ON INIT BarExplorer(oExBar)
return nil
FUNCTION BarExplorer(oExBar)
local oPanel1, oPanel2, oPanel3, oPanel4
local bClick := { | o | MsgInfo( o:GetText() ) }
oPanel1:= oExBar:AddPanel( "Panel 1", , 200)
oPanel1:lSpecial:=.T.
oPanel2 = oExBar:AddPanel( "Panel 2", , 200)
oPanel3 = oExBar:AddPanel( "Panel 3", , 100)
oPanel4 = oExBar:AddPanel( "Panel 4", , 200)
oPanel5 = oExBar:AddPanel( "Panel 5", , 100)
oPanel6 = oExBar:AddPanel( "Panel 6", , 200)
oPanel1:AddLink( "First item", bClick, "additem" )
oPanel1:AddLink( "Second item", bClick, "copy" )
oPanel2:AddLink( "First item", bClick, "adddbf" )
oPanel2:AddLink( "Second item", bClick, "delete" )
oPanel2:AddLink( "Third item", bClick, "envelope" )
oPanel2:AddLink( "Fourth item", bClick, "envelope")
oPanel3:AddLink( "First item", bClick, "adddbf" )
oPanel3:AddLink( "Second item", bClick, "delete" )
oPanel3:AddLink( "Third item", bClick, "envelope" )
oPanel3:AddLink( "Fourth item", bClick, "envelope")
oPanel4:AddLink( "First item", bClick, "adddbf" )
oPanel4:AddLink( "Second item", bClick, "delete" )
oPanel4:AddLink( "Third item", bClick, "envelope" )
oPanel4:AddLink( "Fourth item", bClick, "envelope")
oPanel5:AddLink( "First item", bClick, "adddbf" )
oPanel5:AddLink( "Second item", bClick, "delete" )
oPanel5:AddLink( "Third item", bClick, "envelope" )
oPanel5:AddLink( "Fourth item", bClick, "envelope")
oPanel6:AddLink( "First item", bClick, "adddbf" )
oPanel6:AddLink( "Second item", bClick, "delete" )
oPanel6:AddLink( "Third item", bClick, "envelope" )
oPanel6:AddLink( "Fourth item", bClick, "envelope")
oDlg:oleft= oExBar
RETU NIL
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot], Marc Venken and 67 guests