Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Making comboboxes only respond to changes
Message
 
À
01/08/1996 02:04:12
Grant Floyd
Phil Radford Consultants
Tauranga, Nouvelle Zélande
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00004912
Message ID:
00004955
Vues:
32
>I've been having difficulty persuading Visual FoxPro comboboxes to behave rationally. I have a KeyPress event looking for ENTER to execute some code to populate the drop down. I also have an Interactive Change and/or a Click event to tell me when a selection from the dropdown is made.
>
>Problem is, the KeyPress event works fine, but if I use Interactive Change or Click event I can never tell when an ENTER is done with the list dropped down or not. If is is hit when the drop down is on, I want to select the value entered on, other wise I want to us the display value.
>
>Bizzarely enough using a the ListIndex often returns greater than zero when new values are being entered, when I had assumed it would be set to zero when you started tying characters not seen in the drop down.
>
>What is the standard method of handling combobox entry?
>
>Thanks in advance
>Grant
Hi Grant,
I'm not exactly sure what you're trying to accomplish here interface-wise but if I were you, I'd rip out all that interactivechange and keypress stuff and just use the displayvalue of the combobox at the time of the combobox valid. As I said, I'm not exactly sure what you're trying to do. But it seems to me that you're over-complicating things.
Good luck
Hugh
Microsoft hears loudest what the VFP community says about Visual FoxPro by looking at the bottom line!

Support the product. Buy the latest version!

Hugh Winters @ WorldData 408-512-1131
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform