Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select first field on a page
Message
De
03/08/1999 21:39:10
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, États-Unis
 
 
À
03/08/1999 19:01:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00249484
Message ID:
00249554
Vues:
21
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform