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!
See more
See less

Partner 728x90

Collapse

Property Grid...

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

    Property Grid...

    In my custom indicator, I would like to add a drop down list to a property so I use can select from 3 options. Can someone point me in the direction on how this is done please?

    For instance:

    [XmlIgnore()]
    [Description("Description here")]
    [GridCategory("Category here")]
    [Gui.Design.DisplayNameAttribute("Display name here")]
    public int MyProperty
    {
    get { return myProperty; }
    set { myProperty = value; }
    }

    I need to create a property with drop down selections like I see in other NT indicators, Color values, etc.

    #2
    I think you need to look into using an enum as the parameter. Here is a sample provided by Ninja:



    hth,
    coolmoss

    Comment


      #3
      That's cool, thanks. But my issue is that I need to return DataGridViewContentAlignment value of either:
      MiddleLeft,
      MIddleCenter,
      MiddleRight

      Not sure the enum can do that , at least i haven't figure it out yet. What say ye?

      Comment


        #4
        Hello,

        Yes enum should be what you're looking for. For more details on its usage (in addition to the link already posted) http://www.csharp-station.com/Tutorials/Lesson17.aspx

        Please let me know if I can be of further assistance.
        LanceNinjaTrader Customer Service

        Comment


          #5
          Never imagined the enum can be used in that way. I am also confused with a similar C# property grid question, I read through the property grid tutorial but didn't find the good solution to my annoyance.

          Comment


            #6
            Hello xiaoyuandlg,

            Welcome to the NinjaTrader Support Forums!

            That is a bit out of the scope that we can support here at NinjaTrader.

            On different subjects like this you may want to start a new thread as well but I will leave this thread open incase a member of our Support Forums has worked with the "KetticPropertyGrid".
            JCNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by aa731, Today, 02:54 AM
            0 responses
            4 views
            0 likes
            Last Post aa731
            by aa731
             
            Started by thanajo, 05-04-2021, 02:11 AM
            3 responses
            470 views
            0 likes
            Last Post tradingnasdaqprueba  
            Started by Christopher_R, Today, 12:29 AM
            0 responses
            10 views
            0 likes
            Last Post Christopher_R  
            Started by sidlercom80, 10-28-2023, 08:49 AM
            166 responses
            2,237 views
            0 likes
            Last Post sidlercom80  
            Started by thread, Yesterday, 11:58 PM
            0 responses
            5 views
            0 likes
            Last Post thread
            by thread
             
            Working...
            X