Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inheritance some of the time but not all of the time?
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Inheritance some of the time but not all of the time?
Miscellaneous
Thread ID:
00186503
Message ID:
00186503
Views:
62
I wanted to have a combobox that used key pneumonics (DropDown List) but if the user pressed UPARROW or DNARROW the combobox would be existed appropriately (DropDown Combo). If I put the following code into the combobox I get exactly what I wanted:
.KeyPress Event
IF This.Style=2 AND This.mlListLikeCombo
	IF nKeyCode=5 OR nKeyCode=24		&&UPARROW or DNARROW
		This.Style=0					&&Set .Style to DropDown Combo
		DODEFAULT()
	ENDIF
ENDIF

.Valid Event
IF This.Style=0 AND This.mlListLikeCombo
	This.Style=2						&&Set .Style back to DropDown List
ENDIF
However, when I put the same code into my combobox class it doesn't work properly. The combobox does exit as expected but the .Value is blanked out. Any help on this would be greatly appreciated. My users prefer this combined functionality and I would hate to have to have this code in every combobox ever used.
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.
Next
Reply
Map
View

Click here to load this message in the networking platform