Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SERIOUS BUGS: Container in grid cell and Got/Lostfocus
Message
From
24/10/2005 02:47:05
 
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Title:
SERIOUS BUGS: Container in grid cell and Got/Lostfocus
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01061536
Message ID:
01061536
Views:
52
Observed:
put a container inside a grid cell,
- if the container cannot receive the focus,
in every case (VFP doesn't respect enabled,visible,none member)
the event Container.lostfocus is called;

- if the container can receive the focus,
it is called the event Form.Gotfocus.

For us this is a critical event
because we have only based cells on a businessValue container class.
CLEAR

PUBLIC oform1

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

DEFINE CLASS form1 AS form

	allowoutput = .F.
	Height = 417
	Width = 605
	Autocenter = .T.

	ADD OBJECT GR AS myGrid WITH ;
		Height = 368, ;
		Left = 4, ;
		Top = 4, ;
		Width = 554
		
	PROCEDURE Load
		CREATE CURSOR bugfocus (f1 i, f2 i)
		APPEND BLANK
		APPEND BLANK
		APPEND BLANK
		LOCATE
	ENDPROC

	PROCEDURE GotFocus
		? PROGRAM()
	ENDPROC

ENDDEFINE

DEFINE CLASS myGrid AS Grid
		RowHeight = 100

	ADD OBJECT C1 AS myColumn WITH Width = 224

	ADD OBJECT C2 AS myColumn WITH Width = 224 ,cc.Enabled = .F.,cc.Visible = .F.

	PROCEDURE C1.CC.Init
		THIS.AddObject("text1","textbox")
		this.text1.visible= .t.
	ENDPROC
	
ENDDEFINE

DEFINE CLASS myColumn AS Column

	ADD OBJECT HEADTEXT	AS HEADER
	
	ADD OBJECT cc AS Container
	
	PROCEDURE cc.GotFocus
		? PROGRAM()
	ENDPROC	

	PROCEDURE cc.LostFocus
		? PROGRAM()
	ENDPROC	
		
ENDDEFINE
Reply
Map
View

Click here to load this message in the networking platform