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

How to create custom Editor for a custom property type?

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

    How to create custom Editor for a custom property type?

    Hi!
    How to create custom Editor for a custom property type?
    Please provide some examples or some description

    Main idea is to get some right button or show properties with a full view

    With best regards

    Click image for larger version

Name:	Custom Editor 2.png
Views:	271
Size:	3.3 KB
ID:	1182656
    Click image for larger version

Name:	Custom Editor.png
Views:	276
Size:	5.5 KB
ID:	1182657

    #2

    Hi fut_practic, thanks for posting. We have a custom expandable class example here:

    Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.


    Best regards,
    -ChrisL
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChrisL View Post
      Hi fut_practic, thanks for posting. We have a custom expandable class example here:

      Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.


      Best regards,
      -ChrisL
      Thanks,
      but is there any example with custom Editor implementation code?

      Comment


        #4
        Hi fut_practic, thanks for your reply.

        Can you clarify what you mean by an editor? A text editor or something else?

        Best regards,
        -ChrisL
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_ChrisL View Post
          Hi fut_practic, thanks for your reply.

          Can you clarify what you mean by an editor? A text editor or something else?

          Best regards,
          -ChrisL
          I mean these Editors:

          [PropertyEditor("NinjaTrader.Gui.Tools.StringStanda rdValuesEditorKey")]

          [PropertyEditor("NinjaTrader.Gui.Tools.CollectionEd itor")]

          How can I implement my own Editor and then apply it for corresponding property?

          Comment


            #6
            Hi fut_practic, I found this example for a custom editor that launches a WPF window:

            Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.


            Best regards,
            -ChrisL
            Chris L.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_ChrisL View Post
              Hi fut_practic, I found this example for a custom editor that launches a WPF window:

              Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.


              Best regards,
              -ChrisL
              Seems ok, but

              Code:
              propGrid.RaiseEvent(new System.Windows.Controls.WpfPropertyGrid.PropertyVa lueChangedEventArgs(System.Windows.Controls.WpfPro pertyGrid.PropertyGrid.PropertyValueChangedEvent, propertyValue.ParentProperty, ""));
              doesn't call property setter

              Comment


                #8
                Hello fut_practic,

                The raise event would not be something we can assist with as that is a third party control being used for the property editor. It may or may not work as expected with existing WPF items like raiseevent. You can set a value to a property to have its setter called.


                JesseNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by kaywai, Today, 06:26 AM
                1 response
                3 views
                0 likes
                Last Post kaywai
                by kaywai
                 
                Started by ct, 05-07-2023, 12:31 PM
                6 responses
                202 views
                0 likes
                Last Post wisconsinpat  
                Started by kevinenergy, 02-17-2023, 12:42 PM
                118 responses
                2,779 views
                1 like
                Last Post kevinenergy  
                Started by briansaul, Today, 05:31 AM
                0 responses
                9 views
                0 likes
                Last Post briansaul  
                Started by traderqz, Yesterday, 12:06 AM
                11 responses
                28 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Working...
                X