Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Color inside SimpleFont group

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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:

    Click image for larger version

Name:	simpleFontGroup.png
Views:	122
Size:	9.7 KB
ID:	1258353

    #2
    Here:


    I found a workaround created by NinjaTrader_ChelseaB.

    Click image for larger version

Name:	inside.png
Views:	126
Size:	4.2 KB
ID:	1258404

    But, it is missing on how make something like in the stroke property:

    Click image for larger version

Name:	inside2.png
Views:	146
Size:	1.3 KB
ID:	1258403

    Any idea how to show the text align with "Text Style" like​:
    (little OrangeRed rectangle), Arial, 11px

    ?

    Comment


      #3
      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


      Comment


        #4
        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


          #5
          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")]

          Comment


            #6
            Nevermind, a post of NinjaTrader_ChelseaB showed me how to do it.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            579 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            334 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            554 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            551 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X