In the example below, the data in a cell is tested and if the test fails
the cell is cleared and I want the focus to remain in the cell
instead of moving to the next one.
Thanks.
Code: Select all
DCBROWSECOL ELEMENT 1 HEADER 'Item' WIDTH 15 ;
PARENT oInput ;
PROTECT {|| .F. } ;
EDITOR 'ItemEditor'
@ nil,nil DCGET xNil PICTURE REPL("!",20) ;
GETID 'ItemEditor' ;
VALID {|oGet,cItem,o| ;
cItem := oGet:Get:VarGet() ;
, cItem := IF(OkItem(cItem), cItem, SPACE(20) ) ;
, oGet:Get:VarPut(cItem) ;
, oGet:Get:UpdateBuffer() ;
, oInput:refreshCurrent() ;
, IF(EMPTY(cItem), ???? set focus back to this cell ????, nil ) ;
, .T. }