|
-
April 16th, 2003, 10:26 PM
#1
flexgrid question
Im working on a project in VB6 using ms flexgrid. when the program loads all the columns come up pushed all the way over to the left making the whole thing look like crap.
anybody know how to size the columns at runtime??
TIA
Bukhari:V3B48N826 “The Prophet said, ‘Isn’t the witness of a woman equal to half of that of a man?’ The women said, ‘Yes.’ He said, ‘This is because of the deficiency of a woman’s mind.’”
-
April 17th, 2003, 12:11 AM
#2
Hey Hey
I believe this is what you are asking about, but u can correct me if I'm wrong.. and I'll try and provide a solution for your problem.
This depends on what FlexGrid you are using..... if you use the MS Hierarchical FlexGrid.. it should work fine..
MSFlexGrid.ColWidth(X) = (width)
where X is the Column you are addressing.. (0, 1, 2, 3......... N)
-
April 17th, 2003, 01:52 AM
#3
thanks for the reply!
Its 'microsoft FlexGrid Control 6.0' found under project>>components
I've tried many ways to make it work:
Private Sub Form_Load()
Dim ColWidth As Long
Dim Field1
Dim Field2
Dim Field3
MSFlexGrid1.ColWidth(Field1) = 500
MSFlexGrid1.ColWidth(Field2) = 200
MSFlexGrid1.ColWidth(Field3) = 5000
End Sub
i keep fooling with this 'MSFlexGrid.ColWidth(X) = (Width)' but i kept getting "object not defined so i dimmed everything
all the change i do just seem to affect field1 and the column i want to affect is field2
Bukhari:V3B48N826 “The Prophet said, ‘Isn’t the witness of a woman equal to half of that of a man?’ The women said, ‘Yes.’ He said, ‘This is because of the deficiency of a woman’s mind.’”
-
April 17th, 2003, 03:58 AM
#4
Try using just numbers.. 0,1,2 and so on.. deal with it like it's an array...
your other option is to use:
Microsoft Hierarchical FlexGrid Control 6.0 found in the same spot.. this one will definately accept ColWidth....
-
April 17th, 2003, 06:49 PM
#5
HTRegz your da man!
Private Sub Form_Load()
MSFlexGrid1.ColWidth(1) = 3200
End Sub
this is working with the MSFlex grid as well as MSHFlexGrid
but it looks great now, thanks again
Bukhari:V3B48N826 “The Prophet said, ‘Isn’t the witness of a woman equal to half of that of a man?’ The women said, ‘Yes.’ He said, ‘This is because of the deficiency of a woman’s mind.’”
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|