Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Losing focus in a list box
Message
De
28/04/1997 10:23:28
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, États-Unis
 
 
À
26/04/1997 12:54:59
John Thomason
King Richard Veterinary Centre
Leicester, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00029516
Message ID:
00029879
Vues:
25
>>>
>>> I have an application which I wish to be completely keyboard driven. If I
>>> open a list box programmatically to use as a lookup to fill a text box, how
>>> do I prevent the focus moving to enabled text boxes when the list box has
>>> focus and the arrow keys take the selected row past the top or the bottom
>>> of the list box.
>>>
>>> Thanks in anticipation of your help.
>>
>>First off, use a combobox. You're reinventing the wheel.
>>
>>Once you've done that, you can check to see if DisplayValue has been
>>popoulated in your valid clause to prevent the object from losing focus
>>if empty
>
>Thanks for your response. Can you be specific about the code you would use as !EMPTY(this.DisplayValue) works fine if nKeyCode = 13 is coded for in the keypress event. If it isn't the program tries perform a run command.

?!HUH!? What do you mean? What is it trying to run? Your code should work, without the KeyPress code, unless I'm missing something.

Matt
Matt McDonnell
...building a better mousetrap with moldy cheese...
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform