Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 197
  • Last Modified:

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
0
Maxim10553
Asked:
Maxim10553
1 Solution
 
cnealyCommented:
Try it without :

     .ColSel = .Cols - 1

That may be why you are only selecting one column.
0
 
RAJzCommented:
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
0
 
PaulHewsCommented:
Try:
Private Sub MSFlexGrid1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
   With MSFlexGrid1
       .Col= 0
       .Row = .MouseRow
       .ColSel = .Cols - 1
       .RowSel = .MouseRow
   End With
End Sub
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now