Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox problem
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00156692
Message ID:
00157058
Views:
30
David,

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
>Colin,
>
>I don't have time to work through the specifics now, but you'll have to look at the event log and find what happens when the cbo list is dropped and "upped" and set a flag accordingly. When it's dropped you have to allow the arrow keys to function normally when it's not dropped keyboarding a TAB or BACKTAB as appropriate.
>
>>I agree about the TAB, I try to mention this as much as possible. I guess the situation that is the problem is within the grids. I have .AllowAddNew=.T. and when in a column with a combobox they want UPARROW/DNARROW to move to previous/next row or add a new row when on last row. They find it a pain to have to tab to a column without a combobox to be able to do this and on this I agree with them. Any ideas?
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
Next
Reply
Map
View

Click here to load this message in the networking platform