Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
STATE OF LISTBOX
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00423768
Message ID:
00424374
Vues:
20
>I've been playing with this on my form and the .ListIndex = 1 seemed to work somewhat BUT A STRANGE THING.. In the textbox 'keypress event' I have:
>if nkeycode=24
>*KEYBOARD '{TAB}'
>thisform.mylistbox1.setfocus()
>thisform.MYlistbox1.ListIndex = 1
>endi
>If I hit the downarrow{24} the listbox gets the focus with the 1st item highlighted but as soon as an arrowkey is stroked, the focus moves on to another item. BUT if I hit ENTER{23} ,the listbox gets the focus with the 1st item highlighted AND I can keep on scrolling with the arrows. This is the correct behavior but I want it initiated with the down arrow. :(

Try adding NODEFAULT to your KeyPress event code. Any time you intercept a keypress and do your own thing with it you typically want to suppress the default behavior of that keypress, which is what NODEFAULT does.
Rick Borup, MCSD

recursion (rE-kur'-shun) n.
  see recursion.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform