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
HitTesting - Not sure whats going on
Collapse
X
-
Anon84, great idea. That works. With Opacity set to 1, I can now click the region.
Much appreciated,
Nick.
- Likes 1
-
Hi Chelsea-
Thanks for the feedback; I actually did rip off the rectangle code and modify it. I obviously missed something because the issue definitely doesnt occur with the rectangle. I am finding the documentation isnt very helpful however. Regardless, I have debug print calls and breakpoints set, and when the drawing tool is set to transparent, nothing is firing in my class.
I will figure it, thanks.
Nick.
Leave a comment:
-
Hello Nick,
What if you set the outline color to Transparent using the Rectangle included with NinjaTrader, is this still unable to reproduce?
If so, it may be an issue with the custom script you have created.
(Btw all drawing objects are going to need some logic for selecting anchors)
You might want to start by pulling the logic for Rectangles into a new script out of the DrawingTools > Shapes file as we know this is not able to reproduce the behavior.
I've done something similar for the line tool.
You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.
Leave a comment:
-
Hi Chelsea-
The link below shows a video of what is going on.
There are no errors in the log. I have a simple bool property I check in the OnRender to decide if I call DrawRectangle or not. As you can see in the video, when the rectangle outline is drawn, I can then select it - I have NO SELECTION logic in my code. That is being done higher up in the framework as far as I can tell. When I run in visual studio, I do not get any OnMouseXXX events. However by adding some text to the end, I can select that and it allows the item to then get the mouse events.
This does not happen with the Rectangle, even when I set its outline opacity to 0 so it doesnt have an outline. Its definitely a little weird. I couldnt find anything in the help for development that explains how this all works in Ninja. I must be missing something, but I have no idea what.
Thanks Chelsea,
Nick.
Leave a comment:
-
Hello Nick,
Are errors appearing in the Log tab of the Control Center?
Is this a property that is being checked in the OnRender() method?
Specifically, are you asking if the border of a rectangle is transparent if the object cannot be selected?
Can this reproduced with the Rectangle drawing tool included with NinjaTrader?
Leave a comment:
-
HitTesting - Not sure whats going on
Hi-
I have a custom drawing control that draws a custom rectangle; nothing fancy. If I draw its outline, I can then activate it/select it. I gave the custom rectangle a setting to NOT show its outline. When I draw the rectangle but not its outline, I can no longer interact with it on the chart. I cannot select it. If I set it to draw its outline, it works fine.
Is the framework doing its own hittesting to decide if there is a shape underneath? My rectangles are translucent, but you can see them.
Thanks,
Nick.Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by RideMe, 04-07-2024, 04:54 PM
|
6 responses
31 views
0 likes
|
Last Post
by RideMe
Today, 05:31 PM
|
||
Started by tkaboris, Today, 05:13 PM
|
0 responses
2 views
0 likes
|
Last Post
by tkaboris
Today, 05:13 PM
|
||
Started by GussJ, 03-04-2020, 03:11 PM
|
16 responses
3,281 views
0 likes
|
Last Post
by Leafcutter
Today, 04:14 PM
|
||
Started by WHICKED, Today, 12:45 PM
|
2 responses
19 views
0 likes
|
Last Post
by WHICKED
Today, 03:36 PM
|
||
Started by Tim-c, Today, 02:10 PM
|
1 response
10 views
0 likes
|
Last Post Today, 02:52 PM |
Leave a comment: