vmaxx
asked on
Text in top row of FlexGrid?
How do you put text in the top rows of a MSFlexGrid? I can put stuff in all the grids, but not the top row. I am using VB6.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I had the same problem. This is how I added the first row and then removed the top "blank" row.
FlexGrid1.AddItem "Column1" & vbTab & "Column2" & vbTab & "Column3"
If FlexGrid1.TextMatrix(1, 1) = "" Then FlexGrid1.RemoveItem (1)
FlexGrid1.AddItem "Column1" & vbTab & "Column2" & vbTab & "Column3"
If FlexGrid1.TextMatrix(1, 1) = "" Then FlexGrid1.RemoveItem (1)
ASKER
Thats it, I can't tell you how long I went through the help files looking for that simple command.
thanks
thanks
tblCustomers.FormatString = "CustNo|Cust Name|Balance"
You'd have to look at the colseparators (?) property. I think that the pipe symbol separates the columns, but it could be a vbTab character. You can also include special characters that tell the grid whether to right-align, center or left-align the column:
tblCustomers.FormatString = "^CustNo|<Cust Name|>Balance"