Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's different between Ctrl-tab and click to a page
Message
 
To
21/08/2007 19:09:12
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01249290
Message ID:
01249493
Views:
20
Lim,

I can not reproduce the problem or I do not understand it, here I post a modified snippet I posted this morning, and as far as I understood you, it works as expected
loForm				= Createobject('myForm')
loForm.Show(1)

define class myForm as Form
	add object myPageFrame as myPageFrame with Left=0, Top=0, width=250, height=200
	add object myButton as myButton with left = 251, width=100, Top=0, height=24, caption='Activate Page 2'
enddefine

define class myPageFrame as PageFrame
	add object myPage1 as myPage
	add object myPage2 as myPage
	add object myPage3 as myPage
	add object myPage4 as myPage

	function init() as Boolean
		this.myPage4.PageOrder = 2 && solo para demostrar
	endfunc
enddefine

define class myPage as Page
	add object myText1 as myText with top=10, left=0, width=100, height=24, backcolor=Rgb(0,0,255)
	add object myText2 as myText with top=44, left=0, width=100, height=24, backcolor=Rgb(0,255,0)
	
	procedure activate
*		wait window this.Name + ' activated' nowait
		this.Refresh()
		this.myText1.SetFocus()
	endproc
enddefine

define class myButton as CommandButton
	procedure click
		thisform.myPageFrame.ActivePage = thisform.myPageFrame.myPage2.PageOrder
	endproc
enddefine

define class myText as TextBox && or EditBox
	procedure GotFocus()
		wait window this.Parent.Name + [.] + this.Name + ' got focus' nowait
	endproc
enddefine
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform