Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Down arrow key and selecting a ListBox
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00879967
Message ID:
00880011
Vues:
38
Try to debug to see how it executs step by step:
Like
proc KeyPress
if nKeyCode = 24
       wait wind time 2.0 "pressed down arrow key"
       thisForm.myList1.listIndex= thisForm.mYlist1.Top
       thisform.myList1.setFocus()
       wait wind time 2.0 "In List1 having thisForm.mYlist1.Top highlighted"
       thisform.myList1.click()
endif
Also what is return .t. here for?


>I think tha the key number for a down arrow is 24. And I have the above code in my main
>form but also in the textBox, just to try both. In both cases, the messagebox comes up,
>showing that the code is executing, but then instead of placing the focus in the listbox
>MyList1, the focus gets placed into the adjacent command button. It's as if the
>down arrow key is being interpreted as my having hit the Tab key. And no matter what
>I say to do with the keypress, the program goes on as if I hit the tab key.
>Steve
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform