Link to home
Start Free TrialLog in
Avatar of Maxim10553
Maxim10553Flag for United States of America

asked on

MSFlexGrid Question

How do you programmaticly highlight an entire selected row in a MSFlexGrid Control. I have this code but it only highlights the second column in the row, and i need the whole row selected.

Private Sub MSFlexGrid1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
    With MSFlexGrid1
        .ColSel = .Cols - 1
        .RowSel = .MouseRow
    End With
End Sub
Avatar of cnealy
cnealy

Try it without :

     .ColSel = .Cols - 1

That may be why you are only selecting one column.
use this code

Private Sub MSFlexGrid1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 2 Then
  With MSFlexGrid1
    If .ColSel = .Cols - 1 And .Row = .MouseRow Then
        MsgBox "ok"
    Else
        MsgBox "no"
    End If
  End With
End If
 
End Sub


RAJz
ASKER CERTIFIED SOLUTION
Avatar of PaulHews
PaulHews
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial