Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>Hi,
>
>I have a form that has a pageframe with 3 pages in it.
>
>The three pages allow the user to enter information in different ways, for example, if he is entering a Dr's info, page1 has controls for first name, last name, etc. If he's entering a Hospital's info, then page 2 is active, with just a Hospital Name control.
>
>Then there are other fields such as address and phone that are common to any type of entry (dr. or hosp).
>
>I placed these controls on the form itself.
>
>When the user is in the last name field and hits the key, I want focus to go to the address control, which is on the form, but so far it's refusing to do this.
>
>Right now, when I tab after entering a last name, focus is then set to the save button (which is on the form, and its tab order is 11 out of 16 - very consistent but doesn't make sense).
>
>Thanks for any help!!!
>
>Alex
Hi Alex,
I think keypress event is the one you have to focus on
I have a keypress event that is like this:
LPARAMETERS nKeyCode, nShiftAltCtrl
IF nKeyCode = 9 && TAB is pressed
=This.Parent.Parent.Page2.setfocus()
thisform.refresh
ENDIF
In this example the focus jumps to the next page - and gives the first active element the focus.
Hopes this helps
Lasse
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement