HELP!

THANKS

Postby davidlim » Wed May 14, 2008 10:37 pm

Thanks James.
davidlim
 
Posts: 12
Joined: Tue May 06, 2008 10:26 am

Postby James Bott » Wed May 14, 2008 10:45 pm

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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby davidlim » Wed May 14, 2008 11:53 pm

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.
davidlim
 
Posts: 12
Joined: Tue May 06, 2008 10:26 am

WORKS!

Postby davidlim » Thu May 15, 2008 12:12 am

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.
davidlim
 
Posts: 12
Joined: Tue May 06, 2008 10:26 am

Postby Antonio Linares » Thu May 15, 2008 8:46 am

David,

Try this:
Code: Select all  Expand view
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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

OK

Postby davidlim » Thu May 15, 2008 1:40 pm

"Now when you press enter, the DbChoice() dialog should close automatically" ... Antonio

Ok, Thanks.
davidlim
 
Posts: 12
Joined: Tue May 06, 2008 10:26 am

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 61 guests