Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Click on PageFrame Set Focus to specific control
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00897736
Message ID:
00897884
Vues:
13
Tracy
I would move the code from the Click event of the Page to the Activate event, otherwise focus will go to the specified control every time the user clicks anywhere on the page that is empty...
Jaime

>I use the form's keypress event to trap for the pageup and pagedown keys being pressed so I can set the focus to the correct control on the page. If the user presses pageup to get to the previous page, focus is set to the last control on the page and if the user presses pagedown to get to the next page focus is set to the first control on the next page.
>
>We have hotkeys set for listboxes on some of the pages. In each listbox when event we set ON KEY LABEL F5 DO FORM ... to allow the user to add entries to the listbox. The on key label is reset in the listbox's lostfocus. There are typically two listboxes on each page. This works fine except when the user instead uses the mouse to click on the page tab to go to a specific page. In that case the focus is on the page's tab and not on any control. The user doesn't realize this and thinks they are on the first control and presses F5 and nothing happens.
>
>I have put code in the page's click event to setfocus to the first control on the page and it seems to do the trick. Is there any reason that this may not be a good idea? It has not been tested live yet, and I'd like to rule out any negative repercussions if possible in advance. One drawback is that I won't know if the user is moving forward or backwards in the page order so I cannot determine if focus should be on the first or last control on the page so it will always have to be the first control.
>
>TIA!
>Tracy
Why do programs stop working correctly as soon as you leave the Fox?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform