I have it perfectly working in normal oDlg or oWnd
But how to use this function when I want to use folders ?
I have a Dlg where I create buttons in a loop
- Code: Select all Expand view
nMove:=0
nTop:= 80
nLeft:= 1225
for i = 1 to len(aPloegen)
nMove+=30
cPloeg = alltrim(aPloegen[i])
if i = 14
nMove:=30
nTop:= 80
nLeft:= 1315
endif
@ nTop+nMove,nLeft BTNBMP aBtn[i] OF oDlg SIZE 80, 25 NOBORDER PROMPT aPloegen[i] 2007 ACTION SET_SCOPE_ploegen(oBrw,::cCaption) font oBold CENTER
next
than I create a folder with 4 tabs, each tab has a Xbrowse with the same database, only different fields.
I also Use Mr Rao's function to show options for the browse to happen.
Now it will always use the browse setting from the first folder, but how to changes the buttons behavior so that when folder 2 gets focus,
all buttons will act from the second browse (insite folder2)
- Code: Select all Expand view
function BrwBarBtns( oBar, oBrw )
local n := 1
DEFINE BUTTON OF oBar FILE "\fwh\bitmaps\top.bmp" PROMPT "Top" TOOLTIP "Go Top" ;
ACTION ( oBrw:GoTop(), oBrw:SetFocus() )
DEFINE BUTTON OF oBar FILE "\fwh\bitmaps\16x16\goto.bmp" PROMPT "GoTo" TOOLTIP "Go To Record" ;
ACTION ( If( MsgGet( "GOTO RECORD", "Enter Rec No #", @n ), ;
( oBrw:BookMark := n, oBrw:Refresh() ), nil ), oBrw:SetFocus() )
DEFINE BUTTON OF oBar FILE "\fwh\bitmaps\bottom.bmp" PROMPT "Bottom" TOOLTIP "GoBottom" ;
ACTION ( oBrw:GoBottom(), oBrw:SetFocus() )
DEFINE BUTTON OF oBar FILE "\fwh\bitmaps\new2.bmp" PROMPT "Add" GROUP TOOLTIP "Add New Record" ;
ACTION oBrw:EditSource( .t. )
DEFINE BUTTON OF oBar FILE "\fwh\bitmaps\edit.bmp" PROMPT "Edit" TOOLTIP "Edit Record" ;
ACTION oBrw:EditSource()
DEFINE BUTTON OF oBar FILE "\fwh\bitmaps\16x16\delete0.bmp" PROMPT "Delete" TOOLTIP "Delete Record" ;
ACTION ( If( MsgYesNo( "Delete Record?" ), oBrw:Delete(), nil ), oBrw:SetFocus() )
DEFINE BUTTON OF oBar FILE "\fwh\bitmaps\16x16\excel.bmp" PROMPT "Excel" GROUP TOOLTIP "Export to Excel" ;
ACTION oBrw:ToExcel()
DEFINE BUTTON OF oBar FILE "\fwh\bitmaps\printquick16.bmp" PROMPT "Print" TOOLTIP "Print Report" ;
ACTION oBrw:Report()
DEFINE BUTTON OF oBar FILE "\fwh\bitmaps\close.bmp" PROMPT "Close" GROUP TOOLTIP "Close" ;
ACTION oBrw:oWnd:End()
return nil