• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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:

    http://www.ninjatrader.com/support/f...enum+parameter

    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.
        Lance B.NinjaTrader 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 Leope, Today, 05:39 AM
            0 responses
            1 view
            0 likes
            Last Post Leope
            by Leope
             
            Started by memonic, Today, 05:14 AM
            0 responses
            1 view
            0 likes
            Last Post memonic
            by memonic
             
            Started by svadukia, Today, 04:38 AM
            0 responses
            1 view
            0 likes
            Last Post svadukia  
            Started by dadarara, Today, 04:19 AM
            0 responses
            2 views
            0 likes
            Last Post dadarara  
            Started by Shansen, Today, 04:13 AM
            0 responses
            2 views
            0 likes
            Last Post Shansen
            by Shansen
             
            Working...
            X