关于mshflexgrid控件的右键问题
右键选择mshflexgrid控件中任意一条纪录的时候怎么能让相应的这条纪录也变亮,就象是用左键选择那样。我有一段程序,但不知道应该怎么改。
程序如下:
Private Sub mshflexgrid1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 2 Then
gengx = mshflexgrid1.TextMatrix(mshflexgrid1.MouseRow, 1)
Label3 = gengx
datashow.PopupMenu popm
End If
End Sub
[解决办法]
Private Sub ModHFGrid1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 2 Then
ModHFGrid1.Row = ModHFGrid1.MouseRow
ModHFGrid1.ColSel = ModHFGrid1.Cols - 1
gengx = ModHFGrid1.TextMatrix(ModHFGrid1.MouseRow, 1)
Text1.Text = gengx
End If
End Sub