Forum Discussion

JDR2500's avatar
JDR2500
Frequent Contributor
12 months ago
Solved

DblClick failing because point is out of bounds??

Hmm, I'm having an interesting problem trying to double-click on a control in our desktop application.  The problem is the DblClick (double-click) action fails and the log reports that is because the...
  • JDR2500's avatar
    JDR2500
    12 months ago

    I've taken a different approach and it's working.  Since the hover is in the correct position, I get the screen coordinates of the mouse cursor at that point.  Then I double-click on the screen coordinates relative to the application rather than the column header object.  That's double clicking in the desired place.

      Set o_colHdr = <Alias to column header here>
      i_Width = o_colHdr.Width
      i_Height = o_colHdr.Height
      x = i_Width
      y = i_Height/2
      o_colHdr.HoverMouse x, y
      x = Sys.Desktop.MouseX
      y = Sys.Desktop.MouseY
      Aliases.Sys.Ezp.Session.DblClick x, y

    I think the original problem is probably a bug with the DblClick method.  Something with coordinates relative to an object vs. the screen.  However, rather than pursuing that with support I'll go with my workaround.

    Thanks for all your feedback.