Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP6SP5 - SetFocus to the first user control text, butt
Message
From
21/05/2003 09:11:59
Lutz Scheffler (Online)
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00790342
Message ID:
00791017
Views:
30
>This sort of thing may be of help...
>
>
>LOCAL lnLoop, lnClass,lnLoopPages, lnPagesControls, lcPageControlClass, lnPages
>WITH THISFORM
>	FOR lnLoop = 1 TO .CONTROLCOUNT
>		lcClass = UPPER(.CONTROLS[lnLoop].BASECLASS)
>		IF lcClass = "TEXTBOX" THEN
>			.CONTROLS[lnLoop].SETFOCUS
>		ENDIF
>		
>		IF lcClass ="PAGEFRAME" THEN
>			lnPages = .CONTROLS[lnLoop].PAGECOUNT
>			FOR lnLoopPages = 1 TO lnPages
>				FOR lnPagesControls = 1 TO .CONTROLS[lnLoop].PAGES[lnLoopPages].CONTROLCOUNT
>					lcPageControlClass = UPPER(.CONTROLS[lnLoop].PAGES[lnLoopPages].CONTROLS[lnPagesControls].BASECLASS)
>					IF lcPageControlClass == "TEXTBOX"
>						.CONTROLS[lnLoop].PAGES[lnLoopPages].CONTROLS[lnPagesControls].SETFOCUS()
>					ENDIF
>				ENDFOR
>			ENDFOR
>                ENDIF
>	ENDFOR
>ENDWITH
>
>
>but you would still probably need to set some property on the first control so that you have some way of identifying it in the controls collection.
>

TABINDEX may be what your looking for
>HTH
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Reply
Map
View

Click here to load this message in the networking platform