• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 238
  • Last Modified:

How to ensure that a single row will highlight in mshflexgrid.mousemove event.

Dear experts
         I have spent 100 points already for this question but these became useless due to it was not on proper place.
        I want to arrange a subroutine in which i want to select the specific row in mouse move event like this
                 sub mshlfexgrid1_mousemove()
                      mshflexgrid1.row=mshflexgrid1.mouserow
                      mshflexgrid1.rowsel=mshflexgrid1.row
                     end if
but this subroutine highlights nothing just change the row of flexgrid. if i change the routine like this.
             mshflexgrid1.rowsel=mshflexgrid1.mouserow
then it highlights the multi row not a single row each time.
pls help me in thins contest.
thanks
Ali
0
ALIHAIDER1
Asked:
ALIHAIDER1
1 Solution
 
jayeshshahCommented:
change the
allowBigSelection property to false and then use the above code as

Private Sub MSHFlexGrid1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
    MSHFlexGrid1.Row = MSHFlexGrid1.MouseRow
    MSHFlexGrid1.RowSel = MSHFlexGrid1.MouseRow
End Sub

K'Regards

Jayesh
0
 
ALIHAIDER1Author Commented:
Sorry Jayesh
      Nothing happened. Result is as it was before.
Any other opinion.
Ali
0
 
Mahesh_knCommented:
Hi

Try this

Private Sub MSHFlexGrid1_mousemove(Button As Integer, Shift As Integer, x As Single, y As Single)
    If MSHFlexGrid1.Row <> MSHFlexGrid1.MouseRow Then
        MSHFlexGrid1.Row = MSHFlexGrid1.MouseRow
        MSHFlexGrid1.ColSel = MSHFlexGrid1.Cols - 1
    End If
End Sub

For better look change the property FocusRect = flexFocusNone

Mahesh
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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