I'm wonder if I can put the Color property inside the SimpleFont group like in the image below:
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
Color inside SimpleFont group
Collapse
X
-
Color inside SimpleFont group
Hey guys,
I'm wonder if I can put the Color property inside the SimpleFont group like in the image below:
Tags: None
-
Hello rafaelcoisa,
The post you linked is just for making an expandable object however that will not work correctly in all cases. The properties won't be displayed correctly in the UI like you have pictured, it shows the color as #FFF4500 and includes the internal naming of the type.
When you want to make a color for a text you need to make a seperate Brush property.
If you wanted to group these items you can use a Display attribute and use the same group for all of the properties: https://ninjatrader.com/support/help...yattribute.htm
JesseNinjaTrader Customer Service
Comment
-
Hey NinjaTrader_Jesse ,
"SimpleFont" and "Stroke" do not work with "ExpandableObject" in order to further customize the UI of an indicator. But, for "Strokes", you can, within an "ExpandableObject" class, create the necessary properties to fill a "Stroke" object created in "State.Configure". I wonder if there is a procedure like this for "SimpleFont" object. An "ExpandableObject" class with an "int" property and a "string" property to fill the "SimpleFont" object in "State.Configure". How to make the string part?
Comment
-
Hello rafaelcoisa,
There is not a way to add more properties to an existing type, for example you can't add a new stroke to the SimpleFont. The UI is only displaying what the SimpleFont is programmed to display for its existing properties.
This would be a situation where we would recommend using groups in the grid rather than using an expandable object. You can make multiple public properties for what you want and then group them together using the Display attribute.
[Display(GroupName="MyOverallPropertyName")]
JesseNinjaTrader Customer Service
Comment
-
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by burtoninlondon, Today, 12:38 AM
|
0 responses
10 views
0 likes
|
Last Post Today, 12:38 AM | ||
Started by AaronKoRn, Yesterday, 09:49 PM
|
0 responses
14 views
0 likes
|
Last Post
by AaronKoRn
Yesterday, 09:49 PM
|
||
Started by carnitron, Yesterday, 08:42 PM
|
0 responses
11 views
0 likes
|
Last Post
by carnitron
Yesterday, 08:42 PM
|
||
Started by strategist007, Yesterday, 07:51 PM
|
0 responses
14 views
0 likes
|
Last Post Yesterday, 07:51 PM | ||
Started by StockTrader88, 03-06-2021, 08:58 AM
|
44 responses
3,983 views
3 likes
|
Last Post
by jhudas88
Yesterday, 06:59 PM
|
Comment