Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select first field on a page
Message
From
03/08/1999 21:39:10
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, United States
 
 
To
03/08/1999 19:01:40
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00249484
Message ID:
00249554
Views:
14
Gerald, Perry,
I would recommend a control that can only get focus via keystroke.
Create a textbox class with the BackColor = This.Parent.BackColor and the BorderStyle = 0. Make it as little as you want. Make it last on the page in TabIndex.
The key is this code in the When().
IF INLIST(LASTKEY(), 18, 5, 15, 19, 127)
	* Going backwards.
ELSE
	* Must be at the end.
	WITH This.Parent.Parent
		IF .ActivePage = .PageCount
			.ActivePage = 1
		ELSE
			.ActivePage = .ActivePage + 1
		ENDIF
	ENDWITH
ENDIF
RETURN .F.
This When() should only fire when the user means to go on--No click or setfocus should matter--not that I've done it...

>I've done stuff like this and it didn't work as expected. One case in particular is when the data entry person is doing corrections. If the edit the last field on page 1, they end up on page 2. In some cases, not what they expected.
>
>PF
>
>>I have a form which has about 5 tabbed pages.
>>I'd like to be able to start at page on, and when the last field is entered on page 1, go automatically to the forst fiels on page 2 etc...
>>
>>Anybody got any experience of doing this.
>>
>>
>>One other thing.... I'm finding that I would like to set my own base classes up for Pages within a Page frame.. but I cant seem to be able to sub class the foxpro basec class fro a page.
>>
>>Any help appreciated.
>>
>>regards
>>
>>Gerard
Charlie
Previous
Reply
Map
View

Click here to load this message in the networking platform