Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need Help to set the focus to the first item in a form
Message
From
09/06/1997 21:09:52
 
 
To
09/06/1997 20:10:33
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00035734
Message ID:
00035739
Views:
44
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
Previous
Reply
Map
View

Click here to load this message in the networking platform