Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Subbox

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

    Subbox

    Hello!
    I have the following code:
    HTML Code:
    if(State == State.SetDefaults)
    {
     ShowmyBox = true;
    }
    In protected override void OnBarUpdate(),
    I have:
    HTML Code:
    protected override void OnBarUpdate()
    {
      if(ShowmyBox)
      {
        my code here;
      }
    }
    With this code, I have a box that I can check/uncheck.
    The idea is to create a subbox linked to this one. That means, I want a subbox to be checked only if the above one is checked.

    Could someone guide me through the process? Is there a specific function to be used for this purpuse? If yes, which and where in the code?

    Many thanks!

    #2
    Hello Stanfillirenfro,

    Thank you for your post.

    I suggest reviewing the reference sample at the following link:


    That sample shows how to customize property grid behavior to do things such as show/hide properties based on user input, disable/enable properties based on input, etc. Based on your description of having a subbox that is checked (enabled) only when the ShowmyBox is checked/true, the examples demonstrated in that script should help you to achieve that goal.

    Please let us know if we may be of further assistance.

    Comment


      #3
      Many thanks NinjaTrader_Emily for your reply and the link.
      Maybe I was not clear in my post.

      I want to code two boxes, where the second would be the daugther of the first one. It is why I am calling it the "Subbox". The second box (subbox) can be checked only if the first one is checked.
      I do not have problem coding individual boxes, but in this case I want to link the second box with the first one.
      I am wondering if there is any documention to achieve it. I would appreciate any suggestion.

      Thanks

      Comment


        #4
        Hello Stanfillirenfro,

        Thank you for your reply.

        Please provide a screenshot demonstrating what you are referring to. My understanding is this would be two checkboxes for user input, correct? The SampleIndicatorTypeConverter shows ways to create sub-properties based on user input that could show/hide options or enable/disable options, and I was thinking this applies to your description. Here is a short video where I select the Sample Indicator Type Converter and demonstrate the show/hide and toggle read-only input properties:
        World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.


        I understand the "sub-properties" for the toggle show/hide checkbox are ints and the read-only values are int and double, but this could be done with a bool checkbox if desired. Would this meet your needs, or are you looking for something else?

        I look forward to your clarification.

        Comment


          #5
          Many thanks NinjaTrader_Emily for your reply and the link.

          It is clear with your explanation. You have highlighted all I need for my code.

          I will definitely use the case#1. This will solve my problem. It is explicit.

          Many thanks again for your help.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          650 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          370 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          109 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          574 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          577 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X