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 kujista, Today, 05:44 AM
            0 responses
            5 views
            0 likes
            Last Post kujista
            by kujista
             
            Started by ZenCortexCLICK, Today, 04:58 AM
            0 responses
            5 views
            0 likes
            Last Post ZenCortexCLICK  
            Started by sidlercom80, 10-28-2023, 08:49 AM
            172 responses
            2,281 views
            0 likes
            Last Post sidlercom80  
            Started by Irukandji, Yesterday, 02:53 AM
            2 responses
            18 views
            0 likes
            Last Post Irukandji  
            Started by adeelshahzad, Today, 03:54 AM
            0 responses
            8 views
            0 likes
            Last Post adeelshahzad  
            Working...
            X