I have problem with oBrw:Disable() becouse xBrowse is not disabled
example
- Code: Select all Expand view RUN
#include "FiveWin.ch"
function Main()
local oDlg, oBrw
local oCol
use customer new exclusive
go top
DEFINE DIALOG oDlg FROM 0, 0 TO 260,550 PIXEL ;
TITLE "Test"
@ 5, 5 XBROWSE oBrw OF oDlg ;
SIZE 265,105 PIXEL ;
AUTOCOLS FOOTERS CELL LINES
ADD oCol TO oBrw DATA CUSTOMER->FIRST ;
HEADER "First"
ADD oCol TO oBrw DATA CUSTOMER->LAST ;
HEADER "Last"
oBrw:CreateFromCode()
ACTIVATE DIALOG oDlg CENTERED ;
VALID ( oBrw:Disable() ,;
TestXBrowseDisable() ,;
MsgInfo("Dialog will be closed") ,;
.t. ;
)
return nil
//---------------------------
function TestXBrowseDisable()
local nSalary := 0
DbGoTop()
do while !eof()
nSalary += Salary
DbSkip()
enddo
MsgInfo("Salary SUM: " + str(nSalary) )
return nil
I dont want xBrowse pointer to change position if xBrowse is disabled
The only solution i have found is to add MsgWait() function ...
- Code: Select all Expand view RUN
ACTIVATE DIALOG oDlg CENTERED ;
VALID ( oBrw:Disable(), MsgWait(,,0) ,;
TestXBrowseDisable() ,;
MsgInfo("Dialog will be closed") ,;
.t. ;
)
But i am not sure is it functionally in any cases
Best regards,