Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pageframe and Tab Sequence
Message
De
21/07/2005 17:44:03
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01034794
Message ID:
01034934
Vues:
17
>>>>>Hi everybody,
>>>>>
>>>>>I have a pageframe, each page has a container with lots of controls. Once I reach the last control in the container using TAB, the TAB (Page caption) get activated. My manager wants it to be out of TAB sequence (so, I guess, it should go back to the first control on that page).
>>>>>
>>>>>Do I have to put some code in the last control KeyPress event to achieve this functionality or there is a better way?
>>>>>
>>>>>Thanks in advance.
>>>>
>>>
>>>* Page Activate
>>>KEYBOARD '{TAB}' PLAIN CLEAR
>>>
>>>
>>>Fabio code works also with:
>>>
>>>* Page Activate
>>>KEYBOARD '{TAB}' CLEAR
>>>
>>
>>I known, but with VFP, if I am able I exaggerate :)
>
>Okay Fabio ;o)

Hi Vladimir,

Apart the jokes, going home has considered us:
it takes PLAIN.

Run this:
- jump in page1 and page2: textbox is activate
- flag the checkbox and repeat the process.
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN

DEFINE CLASS form1 AS form


	Top = 2
	Left = 3
	Height = 250
	Width = 446
	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT check1 AS checkbox WITH ;
		Top = 12, ;
		Left = 142, ;
		Height = 17, ;
		Width = 130, ;
		Alignment = 0, ;
		Caption = "ON KEY LABEL", ;
		Name = "Check1"


	ADD OBJECT pageframe1 AS pageframe WITH ;
		ErasePage = .T., ;
		PageCount = 2, ;
		Top = 50, ;
		Left = 16, ;
		Width = 394, ;
		Height = 189, ;
		Name = "Pageframe1", ;
		Page1.Caption = "Page1", ;
		Page1.Name = "Page1", ;
		Page2.Caption = "Page2", ;
		Page2.Name = "Page2"

	PROCEDURE GotFocus
            * this is necessary for 
            * CLEAR The FirstPageframe.Page1.Activate TAB ( another pageframe Bug )
		CLEAR TYPEAHEAD
 	ENDPROC


	PROCEDURE check1.Valid
		IF EMPTY(THIS.VALUE)
		    ON KEY LABEL TAB
		ELSE 
		    ON KEY LABEL TAB MESSAGEBOX("ON KEY LABE EXECUTED")
		ENDIF
	ENDPROC


	PROCEDURE check1.Destroy
		ON KEY LABEL TAB
	ENDPROC


	PROCEDURE pageframe1.Page1.Activate
		KEYBOARD '{TAB}' CLEAR
	ENDPROC


	PROCEDURE pageframe1.Page2.Activate
		KEYBOARD '{TAB}' PLAIN CLEAR
	ENDPROC

	PROCEDURE init
		this.pageframe1.page1.AddObject("text1","textbox")
		this.pageframe1.page1.text1.Move(40,50)
		this.pageframe1.page1.text1.Visible = .T.
		this.pageframe1.page2.AddObject("text1","textbox")
		this.pageframe1.page2.text1.Move(150,40)
		this.pageframe1.page2.text1.Visible = .T.

ENDDEFINE
This shows a basic rule:
to fumble with input commands to control the objects
it is demential
but when one becomes with the other means crazy
then a demential select become a normal select.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform