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:
00158346
Views:
32
I encountered an odd problem with this solution. If I put this code directly into the combobox on the form it works fine. If I put this code into a combobox class used on a form the UPARROW works fine but the DNARROW blanks out the value. I turned on event tracking for both and discovered the following:
**code directly into the combobox on the form
myform.KeyPress(24,0)
myform.mycombo.KeyPress(24,0)
myform.mycombo.text1.KeyPress(24,0)
myform.Paint()
myform.KeyPress(24,0)
myform.mycombo.Valid()
myform.mycombo.text1.Destroy()
myform.mycombo.LostFocus()

**code into a combobox class used on a form
myform.KeyPress(24,0)
myform.mycombo.KeyPress(24,0)
<strong>myform.mycombo.text1.KeyPress(0,8)
myform.Paint()
myform.mycombo.InteractiveChange()</strong>
myform.mycombo.text1.KeyPress(24,0)
myform.Paint()
myform.KeyPress(24,0)
myform.mycombo.Valid()
myform.mycombo.text1.Destroy()
myform.mycombo.LostFocus()
I'm at a loss for the extra 3 events. Any thoughts? TIA

>Colin,
>
>Clever solution.
>
>>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 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