Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
DrawingTool OnMouseMove is called only when the tool is selected
Collapse
X
-
DrawingTool OnMouseMove is called only when the tool is selected
I'm trying to add a visual effect to a DrawingTool when it's hovered. My first thought was to use the OnMouseMove method, but it didn't fully cover my needs because the method only gets called if the DrawingTool is selected, and I need my hover effect to hover even if it's not selected. Is there any other good solution for doing this, or a workaround to make OnMouseMove work like I need it?Tags: None
-
Hello Matheusfx,
Thank you for the post.
I tried testing the situation you described and also see that the object only has its events called when selected after being drawn. That would be the general expectation based on how the hit testing works with the chart to know what is selected and what drives the anchor system.
For what you are asking I am not certain that this would be possible from the drawing tools events directly. You would likely need to subscribe to the ChartControl mouse events or the overall windows mouse events if you wanted to observe events that don't belong to the object. There is not really a good location I could suggest to do that from a DrawingObject, potentially OnRender or OnMouseUp could be used to trigger a one time action of subscribing to the event if it was not previously subscribed to.
I look forward to being of further assistance.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
599 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
344 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
558 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
557 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment