Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: Column Alignment incorrect with Sparse = .F. txBox
Message
From
16/04/2004 05:51:53
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
BUG: Column Alignment incorrect with Sparse = .F. txBox
Miscellaneous
Thread ID:
00895455
Message ID:
00895455
Views:
61
When you use a Column with a textbox and Sparse = .F.,
VFP build the column with Alignment = Top Left.
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show

DEFINE CLASS form1 AS form

	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 11, ;
		Left = 42, ;
		Height = 27, ;
		Width = 84, ;
		Caption = "CLICK HERE", ;
		Name = "Command1"

	ADD OBJECT grid1 AS grid WITH ;
		ColumnCount = 1, ;
		Height = 200, ;
		Left = 27, ;
		Panel = 1, ;
		RowHeight = 49, ;
		Top = 47, ;
		Width = 320, ;
		Name = "Grid1", ;
		Column1.Sparse = .F., ;		&& <====== TextBox
		Column1.Name = "Column1"
		
		PROCEDURE grid1.Column1.Init
			this.text1.BackColor = RGB(255,0,0)
		ENDPROC

	PROCEDURE Load
		CREATE CURSOR myCursor ( f1 C(10) DEFAULT STR(RECNO()))
		FOR i=1 TO 10
		  APPEND BLANK
		NEXT
		LOCATE
	ENDPROC


	PROCEDURE command1.Click
		KEYBOARD '{TAB}'
	ENDPROC

ENDDEFINE
A possible workaround is to rewrite column alignment,
but this clone column alignment into the textBoxes,
and if i have more column controls with different Alignment i destroy the column schema.

Another way is to force textBox alignment to the correct value into the VCX grid definition.

Much annoying one.
Next
Reply
Map
View

Click here to load this message in the networking platform