Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting the Focus on a Textbox
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00585864
Message ID:
00586078
Views:
36
Thank you for The thread. That is just what I need. I made some minor adjustments and it works fine.

So it will help others out put my code here:
** in the init of My Form Class
** I have created a property called FirstControl
** assined = '' from the begining

LOCAL lnIndex
lnIndex = 1000
FOR EACH oCtl IN THIS.CONTROLS
	IF PEMSTATUS(oCtl,'TabIndex',5)
		IF oCtl.TABINDEX < lnIndex
			lnIndex = oCtl.TABINDEX
			THIS.FirstControl = oCtl.NAME
		ENDIF
	ENDIF

NEXT
Then in my button class I put
** in the click of the button (New/Save & Edit/Cancel)

LOCAL lFirst
lFirst = EVAL("Thisform." + THISform.FirstControl)
lFirst.SETFOCUS
Thanks So much
What is Wisdom?
Wisdom - The ability to respond to any situation according to God's Plan.
Therefore:
USE Wisdom IN Everything ORDER priority AS Knowledge
SELECT Knowledge
BROWSE FOR Understanding WHERE Wisdom=Guide

LeRoy Jackson
Previous
Reply
Map
View

Click here to load this message in the networking platform