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:	128
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:	131
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:	151
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 Mindset, 04-21-2026, 06:46 AM
            0 responses
            63 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            92 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            48 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by cmoran13, 04-16-2026, 01:02 PM
            0 responses
            106 views
            0 likes
            Last Post cmoran13  
            Started by PaulMohn, 04-10-2026, 11:11 AM
            0 responses
            63 views
            0 likes
            Last Post PaulMohn  
            Working...
            X