Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to set focus on control with tabindex=1
Message
 
À
20/04/1999 13:27:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00210187
Message ID:
00210210
Vues:
49
>>How do I set the focus to the control that has tabindex=1 ?
>
>There is no direct way to do it. You can create a form method in oyur base form class that does it though:
>
>Form.FirstControlSetfocus()
>
>FOR EACH oControl IN THISFORM.Controls
>	IF oControl.Tabindex = 1
>		oControl.SetFocus()
>	ENDIF
>ENDFOR
>
You can also get even more generic so that you can utilize other TabIndex settings. I do this to return to a specific control on a form. In my form base class, I have a method called; .SetFocusThisIndex() which takes as parameters, the container (form, container, page, etc.) that the control is on and the TabIndex I want to set focus to.

You can use code similar to above but set focus to the control with the matching TabIndex.

Steve
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform