
Originally Posted by
chosk
Hi Krool,
Sorry for the trouble. I removed my earlier 2 posts because after giving some thoughts, maybe the ListView is more appropriate for my use. I want to be able to select only rows and not columns and only use the scrollbar to scroll the rows. The auto-scrolling of the rows in only one direction - upwards - may pose a problem for me.
Now I just go find a way to simulate ListView column one (ListItem) fixed and not editable. I hope can be done.
Try following before you switch to ListView:
SelectionMode = 1 - ByRow
AllowBigSelection = False
and add following Code:
Code:
Private Sub VBFlexGrid1_BeforeRowColChange(ByVal NewRow As Long, ByVal NewCol As Long, Cancel As Boolean)
If NewRow < VBFlexGrid1.TopRow Then
VBFlexGrid1.Row = VBFlexGrid1.TopRow
Cancel = True
End If
End Sub
Private Sub VBFlexGrid1_BeforeSelChange(ByVal NewRowSel As Long, ByVal NewColSel As Long, Cancel As Boolean)
If NewRowSel < VBFlexGrid1.TopRow Then
VBFlexGrid1.RowSel = VBFlexGrid1.TopRow
Cancel = True
End If
End Sub