Results 1 to 5 of 5

Thread: Double click Msflexgrid

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2005
    Posts
    376

    Double click Msflexgrid

    Is there a way to sense a double Right click in msflexgrid?

  2. #2
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Double click Msflexgrid

    something like:
    VB Code:
    1. Private iButton As Integer
    2.  
    3. Private Sub MSFlexGrid1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    4.     iButton = Button
    5. End Sub
    6.  
    7. Private Sub MSFlexGrid1_DblClick()
    8.     If iButton = vbRightButton Then Debug.Print "Double Right Click"
    9. End Sub

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2005
    Posts
    376

    Re: Double click Msflexgrid

    Yea i was hoping there was a way for the double click to sense it. It's amazing how many problems the double right click can cause since by default it doesn't even select the cell you click. Ill go with storing the button in a variable. Thanks.

  4. #4
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Double click Msflexgrid

    it can be done manually with little effort, e.g.:
    VB Code:
    1. Private Sub MSFlexGrid1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    2.     iButton = Button
    3.     If Button = vbRightButton Then
    4.         MSFlexGrid1.Col = MSFlexGrid1.MouseCol
    5.         MSFlexGrid1.Row = MSFlexGrid1.MouseRow
    6.     End If
    7. End Sub

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2005
    Posts
    376

    Re: Double click Msflexgrid

    Yea i know, but why not allow the same parameters to be passed to the click events. I'm sure it saves space to just pass them to the mouse down, I'm just a little mad cuz I learned this the hard way. someone was double clicking to move items from one grid to another but they were using the right mouse (don't ask me why) and it really messed up some data. I also have 15 grids on this screen so its just tedious.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width