When I assign a value to the row proterty of my flexgrid it doesn't actually show the selection on the grid. Is there a way to make it draw or show the selection?
Printable View
When I assign a value to the row proterty of my flexgrid it doesn't actually show the selection on the grid. Is there a way to make it draw or show the selection?
Comme on ... someone MUST know!?!
I use DbGrids, so anything I offer is no better than a guess. If you change the selectionmode property to 1 (selectrows), does that help?
The other thing I'd look at is the rowsel, which looks like it needs to be set *after* the row property.
You need to Set the Row Property to the Row you want Selected, then you need to Set the ColSel Property to the Last Column in the Row, eg.
Code:Private Sub Command1_Click()
MSFlexGrid1.Row = (MSFlexGrid1.Row + 1) Mod MSFlexGrid1.Rows
MSFlexGrid1.ColSel = MSFlexGrid1.Cols - 1
End Sub
Private Sub Form_Load()
With MSFlexGrid1
.Rows = 0
.Cols = 2
.SelectionMode = flexSelectionByRow
.FocusRect = flexFocusNone
For I = 1 To 10
.AddItem "Row Item 1" & Chr(9) & "Extra Data"
Next
.FixedRows = 0
.FixedCols = 0
End With
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
Cool it works Great! Thanks a lot! :)