We help IT Professionals succeed at work.

MS flxgrd cel select

ashraf_t
ashraf_t asked
on
Hi , in the MS FlxGrid i can click on any cell in the grid to active it and move the focus to it , i can do that with the left mouse button , my question is : is it possible to make that with the right button of the mouse , thanx
Comment
Watch Question

Commented:
on mouse down event

U Have X,Y  and button


     grid.row=y:grid.col = x

Commented:
Sorry I'm wrong about X,Y
I'll see how i did it in my prog's !!!!

from Microsoft help

button Returns an integer that identifies the button that was pressed (MouseDown) or released (MouseUp) to cause the event. The button argument is a bit field with bits corresponding to the left button (bit 0), right button (bit 1), and middle button (bit 2). These bits correspond to the values 1, 2, and 4, respectively. Only one of the bits is set, indicating the button that caused the event.
Commented:
Oh yes
it is MouseRow and mousecol properties
I think it will be

Private Sub MSFlex_MouseUp(Button As Integer, shift As Integer, X As Single, Y As Single)

MSFlex.row=MSFlex.mouserow:MSFlex.col = MSFlex.mousecol

end sub

to have any button selection !!


have fun
CERTIFIED EXPERT
Top Expert 2012

Commented:
Bahnass is correct, although I would put it in the mousedown event and add some additonal code:

Private Sub MSFlex_MouseDown(Button As Integer, shift As Integer, X As Single, Y As Single)

If Button = 2 Then
   MSFlex.row=MSFlex.mouserow:MSFlex.col = MSFlex.mousecol
   If MSFlex.AllowBigSelection Then
      ' Check to see if in Fixed area and add code to duplicate the left mouse button
   End If
End If

End Sub

Anthony

Author

Commented:
Thanx but putting in the the mousedown is better

Explore More ContentExplore courses, solutions, and other research materials related to this topic.