Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need Help to set the focus to the first item in a form
Message
De
09/06/1997 21:09:52
 
 
À
09/06/1997 20:10:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00035734
Message ID:
00035739
Vues:
42
I added a custom method to my form class called m_setfirst, whenever I want to set the focus to the 1st control I just issue ThisForm.m_SetFirst * Method m_SetFirst *) Sets focus to the control with the earliest TabIndex LPARAMETER l_ctoWhich LOCAL l_oCtl, l_oPag IF PCOUNT() < 1 AND TYPE('l_ctoWhich')= 'L' &&Check for pageframes l_ctoWhich = ThisForm ENDIF && Check for pageframes FOR EACH l_oCtl IN l_ctoWhich.Controls WITH l_oCtl IF UPPER(.baseclass) = "PAGEFRAME" FOR EACH l_oPag IN .Pages IF l_oPag.PageOrder = .ActivePage ThisForm.m_SetFirst(l_oPag) ENDIF ENDFOR EXIT ENDIF IF .TabIndex = 1 .SetFocus() EXIT ENDIF ENDWITH ENDFOR
Lister Potter

Lister Potter & Associates
lister@listerpotter.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform