Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: Setfocus go into invisible objects
Message
From
08/10/2005 04:12:40
 
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Title:
BUG: Setfocus go into invisible objects
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01057406
Message ID:
01057406
Views:
65
Expected: a not Visible object ( even if indirectly ) it cannot receive the focus

Run and click on the buttons:
PUBLIC oform1

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

DEFINE CLASS form1 AS form


	Height = 333
	Width = 375
	autocenter = .T.

	ADD OBJECT container1 AS container WITH ;
		Top = 10, ;
		Left = 104, ;
		Width = 200, ;
		Height = 60, ;
		Visible = .F., ;
		Name = "Container1"



	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 8, ;
		Left = 6, ;
		Height = 27, ;
		Width = 84, ;
		Caption = "click", ;
		Name = "Command1"


	ADD OBJECT pageframe1 AS pageframe WITH ;
		PageCount = 2, ;
		Top = 86, ;
		Left = 106, ;
		Width = 241, ;
		Height = 112, ;
		Visible = .F.


	ADD OBJECT command2 AS commandbutton WITH ;
		Top = 92, ;
		Left = 12, ;
		Height = 27, ;
		Width = 84, ;
		Caption = "click", ;
		Name = "Command2"

	PROCEDURE Init
		this.container1.Addobject("text1","textbox")
		this.container1.text1.Visible = .T.
		this.pageframe1.page1.Addobject("text1","textbox")
		this.pageframe1.page1.text1.Visible = .T.

	PROCEDURE command1.Click
		thisform.container1.setfocus   && this don't check the Container1.Visible status
	ENDPROC

	PROCEDURE command2.Click
		thisform.pageframe1.page1.Text1.SetFocus   && this don't check the pageframe1.Visible status
	ENDPROC

ENDDEFINE
Next
Reply
Map
View

Click here to load this message in the networking platform