Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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.JesseNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by judysamnt7, 03-13-2023, 09:11 AM
|
4 responses
57 views
0 likes
|
Last Post
by DynamicTest
Today, 08:25 PM
|
||
Started by ScottWalsh, Today, 06:52 PM
|
4 responses
36 views
0 likes
|
Last Post
by ScottWalsh
Today, 07:40 PM
|
||
Started by olisav57, Today, 07:39 PM
|
0 responses
7 views
0 likes
|
Last Post
by olisav57
Today, 07:39 PM
|
||
Started by trilliantrader, Today, 03:01 PM
|
2 responses
20 views
0 likes
|
Last Post
by helpwanted
Today, 07:25 PM
|
||
Started by cre8able, Today, 07:24 PM
|
0 responses
9 views
0 likes
|
Last Post
by cre8able
Today, 07:24 PM
|
Comment