Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is there a virtual OnMouseClick() handler?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Is there a virtual OnMouseClick() handler?

    I'd like to handle click events in some of the frame anchors of my custom DrawingTool.

    I can override OnMouseDown, OnMouseMove and OnMouseUp but don't see a way to detect click events.

    Do I need to do my own detection, maybe OnMouseDown, followed by a OnMouseUp without much movement?

    #2
    Helo ntdev,

    Thanks for your question.

    There is not a MouseClick event I could suggest. The offered events are OnMouseDown, OnMouseUp and OnMouseMove. If you use intellisense/intelliprompt to check ChartControl for additional events, we can see that a MouseClick event is not offered.

    Yes, I would suggest the same as you are to detect when the mouse is in a down position for the first part of your click and then to store a bool that is checked in the mouse up event to identify a click.

    You could track the mouse position in OnMouseDown and compare that position in OnMouseUp if you want the click to be invalidated if the user clicks and drags from point A to point B and you do not want that registered as a click.

    We look forward to assisting.
    Last edited by NinjaTrader_Jim; 06-04-2020, 08:02 AM.

    Comment


      #3
      Thanks Jim. Yes, that's what I thought but it was worth a shot to ask.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      647 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      369 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      108 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      572 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      573 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X