Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inheritance some of the time but not all of the time?
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Inheritance some of the time but not all of the time?
Divers
Thread ID:
00186503
Message ID:
00186503
Vues:
61
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform