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
Access to NT Color Picker (again)
Collapse
X
-
Hello,
Thank you for the post.
I see this is still available for use in nt8, can you tell me where are you currently trying to use the syntax from the other post, was this from an Addon? Are you trying to use this in an Indicator for a user input?
I tried the following and see this is able to compile:
Code:System.Windows.Controls.WpfPropertyGrid.Controls.BrushPicker bPicker = new System.Windows.Controls.WpfPropertyGrid.Controls.BrushPicker();
I look forward to being of further assistance.JesseNinjaTrader Customer Service
-
Hello,
Thank you for the reply.
To further clarify, are you trying to draw the WPF brush picker control on the chart, or will this brush be selected by the user in the drawing tools options, for example, the Line tool and its Line brush?
If the second is true and you want a brush in the drawing tools options, you would need to make a public property in the drawing tool. If you are instead trying to add the brush picker to the chart, I would likely need to better understand your overall goal to assist further.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
Comment
-
Thank you for your message.
I am currently developing a custom Drawing-Tool to Draw a Midas Curve on the Chart.
Now there are a bunch of settings i should be able to configure after its built.
Instead of me to have to double click the curve or Right-Click to open the Drawing object properties, i want to display a few form controls to adjust the Drawing object right after the curve is built or is in DrawingState.Editing.
This all works. I am able to add a grid to the chartControl and i am able to add controls like sliders etc to that grid, all directly from the custom Drawing Tool.
Now one of the options i would like to be able to change is the Brush i am using for the Draw Object. As WPF doesn't have any Color Pickers available it would be great if i could use the controls from NT.
The Problem is that in the custom drawing tool i can't reference the WpfPropertyGrid as System.Windows.Controls does not include the WpfPropertyGrid. The same is true from an indicator.
Thank you,
MikeLast edited by mk77ch; 02-01-2018, 09:08 AM.
Comment
-
Hello,
Thank you for the reply.
I can see this is working from an indicator, but you do need to add a reference for this to work as this is not included to be used in NinjaScript by default. have you added a Reference to the System.Windows.Controls.WpfPropertyGrid.dll?
I look forward to being of further assistance.JesseNinjaTrader Customer Service
Comment
-
Hello,
When you export in NT8 there is now a drop down menu to choose the various different types. You just need to ensure to check the box for the references you had used in the References drop down.
This would add the Additional references.txt to the zip, you can find the full instructions to include third party assemblies in exports here: https://ninjatrader.com/support/help...esOrNativeDlls
I look forward to being of further assistance.JesseNinjaTrader Customer Service
Comment
-
Hello Jesse,
i've got two more questions.
This works fine now and i am pretty happy with it but there are two problems i am fiddling with.
As soon as i try to type in the BrushPicker Control to quickly select a color by entering the name of the color, the instrument selector, which appears when you start to type on a chart, pops up and i can't type in the BrushPicker control.
Is there a possibility to somehow prevent this behaviour?
The other thing is that i didn't found an event in the BrushPicker control which is fired when i select a brush from the dropdown. Is this possible or did i just not see the event method?
Thank you very much!
Mike
Comment
-
Hello,
Thank you for the reply.
In regard to the instrument picker, yes that would be expected in this case. You could potentially handle the incoming keyboard events from the ChartControl's keyboard event handlers but you would need to figure out a way to know when to do that and when not to do that. This isn't something we generally suggest as this prevents the default chart functions but can also interrupt other ninjaScript items that receive keyboard input. There is also no guarantee that other items that handle the keyboard input will not interrupt your item if applied together.
For the event, I do see the following which you could try:
Code:bPicker.SelectedBrush.Changed
I look forward to being of further assistance.JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by frslvr, 04-11-2024, 07:26 AM
|
7 responses
109 views
1 like
|
Last Post
by caryc123
Today, 10:17 AM
|
||
Started by rocketman7, Today, 09:41 AM
|
3 responses
8 views
0 likes
|
Last Post Today, 10:07 AM | ||
Started by traderqz, Today, 09:44 AM
|
2 responses
5 views
0 likes
|
Last Post Today, 10:00 AM | ||
Started by stafe, 04-15-2024, 08:34 PM
|
8 responses
41 views
0 likes
|
Last Post
by stafe
Today, 10:00 AM
|
||
Started by rocketman7, Today, 02:12 AM
|
7 responses
31 views
0 likes
|
Last Post Today, 09:23 AM |
Comment