Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Textbox Width Off?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00507402
Message ID:
00507500
Views:
15
>Sorry for the confusion, here are things again. The problem is that only the first character of the textbox is showing. The header is showing fine.
>
>This is for my "GridGeneral" class, which will do these things:
>    1. Display up to 5 columns passed to it, regardless of total columns in the cursor
>    2. Size the columns to the width of the widest value in each column
>    3. Keep the mouse pointer a pointer (I am going to stick a transparent box over the grid)
>Obviously, I am only on step 1 of this. :)
>
>In the INIT of the grid class, I create a cursor and bind the grid to it, so when the form starts there is something there. Then in a command button I have this code:
>
>Use  "tablesamp" in 0 shared
>With ThisForm.GridGeneral1
>	.RecordSource = "tablesamp"
>	.LayoutRefresh("cProj,The Project")
>	.Refresh()
>EndWith
>
>Here is the LayoutRefresh code in the GridGeneral class. The header shows fine, but not the textbox stuff.
>
>	Parameters cCol1 , cCol2 , cCol3 , cCol4 , cCol5
>		This.ColumnCount = 0
>		If VarType(cCol1) ="C"
>			oColItems = StrTran( cCol1 , "," , Chr(13) )
>			nItemCount = ALines(arItems, oColItems, .t.)
>	>		This.ColumnCount = This.ColumnCount + 1 && Would be only one column always !!!!!!
>		 With This.Columns(This.ColumnCount)
>			.Width = 50
>			.Header1.Caption = arItems[2]
>			.Header1.FontName = "Tahoma"
>			.Header1.FontBold = .t.
>			.Header1.FontSize = 8
>			.ControlSource = this.RecordSource+"."+arItems[1]	
>			.FontName = "Tahoma"
>			.FontBold = .f.
>			.FontSize = 8
>			.Width = 50
>		EndWith
                endif
>
>
>Thanks again for taking a second look!

Ok, I make few minor corrections. I would probably pass a two (or three - third dimension for the width) dimensional array in this method, which will make the whole life easier...
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform