Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox problem
Message
 
To
11/11/1998 14:19:25
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00156692
Message ID:
00157059
Views:
34
Ed,

I finally came up with a solution that is actually pretty simple and thought I'd pass it along.
In the Combobox.KeyPress I put the following
IF nKeyCode=5 OR nKeyCode=24     &&UPARROW or DNARROW
	This.Style=0                                 &&Set Style to Dropdown Combo
	DODEFAULT()
ENDIF

In the Combobox.Valid I put
This.Style=2           &&Set Style to Dropdown List
>So call KEYBOARD two times, one for TAB, next for DNARROW.
>
>>Thanks for the reply Edward. See reply to David F. for expanded description of problem.
>>
>>>>I have several comboboxes on my form, some on the form and some in a grid. All of them have .Style=2 (Dropdown List) because the users want the keyboard pneumonics (sp?) functionality and they can only pick from what's in the list.
>>>>
>>>>The feature they hate with .Style=2 is that UPARROW and DNARROW change the value. They would rather it acted like when .Style=0 (Dropdown Combo) and move to the previous/next object or in the case of the grid move to the previous/next line item. Any ideas on how to do this?
>>>
>>>**Combo.KeyPress event
>>>
>>>if nKeycode=5 or nKeycode=24
>>> nodefault
>>> keyboard '{TAB}'
>>>endif
>>>
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Previous
Reply
Map
View

Click here to load this message in the networking platform