Page 1 of 1

Combobox Question

Posted: Wed Feb 24, 2016 2:56 pm
by omni
Roger, we use combo boxes quite a bit and have one that users have complained about. The default is a blank as they want the user to be forced to select a valid entry from the pulldown. If they go to the field and select one and tab to the next field it does not take. they have to hit the enter key. Is there something in the getoptions or something else I am missing. Below is the example, which format is fairly standard.

@ 07,59 DCCOMBOBOX TYPE XBPCOMBO_DROPDOWNLIST cStyp33 LIST aLIST33 SIZE 20,5 ;
ITEMSELECTED {||ctrkfind:=cList33[ASCAN(aList33,cStyp33)],dc_getrefresh(getlist) } ;

Thanks,

Fred
Omni

Re: Combobox Question

Posted: Wed Feb 24, 2016 3:12 pm
by rdonnay
You probably have TABSTOP turned on for the DCCOMBOBOX object. This will make it go to the next object.
You could try this:

Code: Select all

@ .. DCCOMBOBOX .. EVAL {|o|o:keyboard = {|a,b,o|iif(a==xbeK_TAB,(DC_ClearEvents(),PostAppEvent(xbeP_Keyboard,xbeK_ENTER,,o)),nil)}}

Re: Combobox Question

Posted: Thu Feb 25, 2016 9:35 am
by omni
Worked...thanks

Re: Combobox Question

Posted: Thu Feb 25, 2016 12:41 pm
by rdonnay
A simpler answer may have been to use the NOTABSTOP clause on the DCCOMBOBOX.