Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: SetFocus on group controls ignore group visible=.F.
Message
From
08/10/2005 04:35:01
 
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Title:
BUG: SetFocus on group controls ignore group visible=.F.
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01057409
Message ID:
01057409
Views:
40
Observed: somegroup.Member.Setfocus ignore the somegroup.Visible = .F.,
and put the focus into a Member, this invisible member consume the UI input
and change his value.

Run,
click on buttons
look on debug output
PUBLIC oform1

ACTIVATE WINDOW "debug output"
oform1=NEWOBJECT("form1")
oform1.Show
RETURN

DEFINE CLASS form1 AS form


	Height = 333
	Width = 375
	autocenter = .T.

	ADD OBJECT commandgroup1 AS commandgroup WITH ;
		ButtonCount = 2, ;
		Value = 2, ;
		Height = 42, ;
		Left = 108, ;
		Top = 210, ;
		Width = 234, ;
		Visible = .F.


	ADD OBJECT command3 AS commandbutton WITH ;
		Top = 220, ;
		Left = 10, ;
		Height = 27, ;
		Width = 84, ;
		Caption = "click", ;
		Name = "Command3"


	ADD OBJECT optiongroup1 AS optiongroup WITH ;
		ButtonCount = 2, ;
		Value = 2, ;
		Height = 30, ;
		Left = 110, ;
		Top = 260, ;
		Width = 234, ;
		Visible = .F.

	ADD OBJECT command4 AS commandbutton WITH ;
		Top = 260, ;
		Left = 14, ;
		Height = 27, ;
		Width = 84, ;
		Caption = "click", ;
		Name = "Command4"

	PROCEDURE command3.Click
		SET EVENTTRACKING ON
		thisform.Commandgroup1.command1.SetFocus
		DEBUGOUT "ACTIVECONTROL : ",SYS(1272,THISFORM.ActiveControl)
		KEYBOARD '{SPACEBAR}'
	ENDPROC


	PROCEDURE command4.Click
		SET EVENTTRACKING ON
		thisform.optiongroup1.option1.SetFocus
		DEBUGOUT "ACTIVECONTROL : ",SYS(1272,THISFORM.ActiveControl)
		KEYBOARD '{SPACEBAR}'
	ENDPROC

	PROCEDURE LOAD
		THIS.Tag = SET("Eventlist")
		SET EVENTLIST TO when,gotfocus,valid,lostfocus,InteractiveChange,keypress
		
	PROCEDURE Unload
		SET EVENTTRACKING OFF
		ET=THIS.Tag
		SET EVENTLIST TO &ET
ENDDEFINE
Reply
Map
View

Click here to load this message in the networking platform