function test_browse()
local oDlg, i
local oBrw1, aArray1 := {}, bAdd1 := {||aadd(aArray1,{1,"01012019",space(8),"0101",space(70),space(70)})}
local oBrw2, aArray2 := {{1,"01012019",space(8),"0101",space(70),space(70)}}
DEFINE DIALOG oDlg SIZE 800,390 PIXEL TITLE "XBROWSE Test"
@ 10, 10 COLUMN XBROWSE oBrw1 OF oDlg ARRAY aArray1 ;
COLS {1,2,3,4,5,6} ;
HEADERS {"Nr","Date1","Date2","Day","Text1","Text2"} ;
JUSTIFY {AL_CENTER,AL_CENTER,AL_CENTER,AL_CENTER} ;
SIZES {30,70,70,70,250} ;
PICTURE {,"@R 99.99.9999","@R 99.99.9999","@R ##.##."} ;
PIXEL;
FASTEDIT;
SIZE oDlg:nWidth()/2-20,oDlg:nHeight()/6
for i = 2 to len(oBrw1:aCols)
oBrw1:aCols[i]:nEdittype := EDIT_GET
oBrw1:aCols[i]:lAutosave := .T.
oBrw1:aCols[i]:bEditValid := {|x|msginfo("'"+x:varget()+"'"+CRLF+"Len: "+alltrim(str(len(x:varget())))),.T.}
// oBrw1:aCols[i]:bonPostedit := {|o,x|msginfo("'"+x+"'"+CRLF+"Len: "+alltrim(str(len(x))))}
next
oBrw1:createfromcode()
@ oBrw1:nBottom+20, 10 COLUMN XBROWSE oBrw2 OF oDlg ARRAY aArray2 ;
COLS {1,2,3,4,5,6} ;
HEADERS {"Nr","Date1","Date2","Day","Text1","Text2"} ;
JUSTIFY {AL_CENTER,AL_CENTER,AL_CENTER,AL_CENTER} ;
SIZES {30,70,70,70,250} ;
PICTURE {,"@R 99.99.9999","@R 99.99.9999","@R ##.##."} ;
PIXEL;
FASTEDIT;
SIZE oDlg:nWidth()/2-20,oDlg:nHeight()/6
for i = 2 to len(oBrw2:aCols)
oBrw2:aCols[i]:nEdittype := EDIT_GET
oBrw2:aCols[i]:lAutosave := .T.
oBrw2:aCols[i]:bEditValid := {|x|msginfo("'"+x:varget()+"'"+CRLF+"Len: "+alltrim(str(len(x:varget())))),.T.}
// oBrw2:aCols[i]:bonPostedit := {|o,x|msginfo("'"+x+"'"+CRLF+"Len: "+alltrim(str(len(x))))}
next
oBrw2:createfromcode()
ACTIVATE DIALOG oDlg ON INIT eval(bAdd1)
return NIL