Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Any way to force a combobox to dropdown?
Message
De
23/03/2007 14:03:58
 
 
À
23/03/2007 13:45:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01207644
Message ID:
01207861
Vues:
18
>>I had proposed accomplishing it with
>>
>>
This.DropDown()
>>
>>in the Combo.Keypress instead of
>>
>>
KEYBOARD   '{ALT+DNARROW}' PLAIN CLEAR
>>
>>This.DropDown() didn't work when I tested it with SPACE. In our framework it does work with the F4 key.
>>
>>
>>>>Retracted, my idea doesn't work with SPACE.
>>>>
>>>>
>>>>>I've got a special quickfill combobox based on the quickfill combo in "1001 Things ...". However, in our situation, no valid entries can begin with spaces. So, I'd like to make the combobox work like a dropdown list when the spacebar is pressed (i.e. opens/displays the dropdown list).
>>>>>
>>>>>I tried trapping the spacebar in the interactivechange event and then calling this.DropClick. That seemed to have no effect.
>>>>>
>>>>>Is this possible to do?
>>>
>>>
>>>Sure you can. In your ComboBox.KeyPress:
>>>
LPARAMETERS nKeyCode, nShiftAltCtrl
>>>IF nKeyCode=32 AND nShiftAltCtrl=0
>>>  NODEFAULT
>>>  KEYBOARD   '{ALT+DNARROW}' PLAIN CLEAR
>>>ENDIF
>
>DropDown is an event, it's what happens when it drops down, it doesn't do the actual drop down.

I know that now! I wrote that code 8 years ago when I converted a FPD app to VFP learning OOP as I was going along. What is weird is that F4 (checking for nKeyCode = -3) works, and has for the last 8 years.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform