In this example below bEditVAlid is executed 2 times
- Code: Select all Expand view
- #include "FiveWin.ch"
#include "XBrowse.ch"
function Main()
local oDlg, oBrw
Local aDati := {{0,0,0},{0,0,0},{0,0,0} }
DEFINE DIALOG oDlg RESOURCE "Test"
REDEFINE XBROWSE oBrw ID 10 OF oDlg ARRAY aDati AUTOCOLS CELL LINES
WITH OBJECT oBrw:aCols[1]
:nEditType := EDIT_GET
:bEditValid := { | oGet, oCol | MSGINFO("Hello") ,.T. }
END
ACTIVATE DIALOG oDlg
return nil
The RC File is
- Code: Select all Expand view
- LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US
TEST DIALOG DISCARDABLE 68, 43, 336, 213
STYLE WS_POPUP|DS_MODALFRAME|WS_CAPTION|WS_SYSMENU|WS_VISIBLE
CAPTION "Test"
FONT 8, "MS Sans Serif"
{
CONTROL "", 10, "TXBrowse", WS_TABSTOP|0x00a00000, 0, 0, 168, 84
}
But with this code it is executed correctly 1 time
- Code: Select all Expand view
- #include "FiveWin.ch"
#include "XBrowse.ch"
function Main()
local oDlg, oBrw
Local aDati := {{0,0,0},{0,0,0},{0,0,0} }
DEFINE WINDOW oDlg
@ 10,10 XBROWSE oBrw OF oDlg ARRAY aDati AUTOCOLS CELL LINES
WITH OBJECT oBrw:aCols[1]
:nEditType := EDIT_GET
:bEditValid := { | oGet, oCol | MSGINFO("Hello") ,.T. }
END
oBrw:CreateFromCode()
oDlg:oClient := oBrw
ACTIVATE WINDOW oDlg
return nil
Regards Maurizo