• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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.
    JimNinjaTrader Customer Service

    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 corman, Today, 06:04 AM
      0 responses
      2 views
      0 likes
      Last Post corman
      by corman
       
      Started by brunoviveiros, Today, 06:00 AM
      0 responses
      1 view
      0 likes
      Last Post brunoviveiros  
      Started by JAtrades, Today, 05:20 AM
      4 responses
      7 views
      0 likes
      Last Post JAtrades  
      Started by riuhdfjkbh, Today, 05:40 AM
      0 responses
      2 views
      0 likes
      Last Post riuhdfjkbh  
      Started by pol133, Today, 02:35 AM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_Marco  
      Working...
      X