Thanks James.
Thanks James.
David,
>(2) for DbChoice, to select a customer, HOW to activate an enter key instead of click on OK button for selection?
We need to see your code for dbchoice().
James
Here is the source code for DbChoice()
function DbChoice( cTitle, cSelect )
local oDlg, oBrw
DEFINE DIALOG oDlg RESOURCE "DbChoice" TITLE cTitle
REDEFINE LISTBOX oBrw ;
FIELDS ArCust->Code, ArCust->Name ;
HEADERS "Code", "Name" ;
ID 100 OF oDlg
ACTIVATE DIALOG oDlg CENTERED
return nil
Thanks.
Hi DUTCH, it WORKS,
(1) i added in exactly what u told and compile, sorry for not notice the complilation error...
REDEFINE GET oGetCode VAR cCode ID 110 OF oDlg Picture "@!" ;
VALID (if(empty(cCode),.F.,(SelectCode( oGetCode,
cCode ),.T.))
missing one ")" at the end.
Thanks.
function DbChoice( cTitle, cSelect )
local oDlg, oBrw
DEFINE DIALOG oDlg RESOURCE "DbChoice" TITLE cTitle
REDEFINE LISTBOX oBrw ;
FIELDS ArCust->Code, ArCust->Name ;
HEADERS "Code", "Name" ;
ID 100 OF oDlg
oBrw:bKeyDown = { | nKey | If( nKey == VK_RETURN, oDlg:End(),) }
ACTIVATE DIALOG oDlg CENTERED
return nil"Now when you press enter, the DbChoice() dialog should close automatically" ... Antonio
Ok, Thanks.