Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Button color state

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

    #16
    Doing that still doesn't work, because my problem is that with F5 it should keep the value at that moment and not set it to the standard value of the variable. If there were any status that would preserve the last value and would always remain even if you reloaded?

    Comment


      #17
      Hello anmir55,

      The button itself does not have it's properties reservced.

      You are preserving the values of DisplayCompletedLines and ColorFondoOff correctly.

      However, you are not using these variables when the button is generated in AddButtonToToolbar().
      Are you are not changing the brush that assigned to ColorFondoOff. It's preserved when hitting F5 but the value was never changed.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #18
        Hello ChelseaB

        Any ideas to fix it?

        Comment


          #19
          Hello anmir55,

          In AddButtonToToolbar(), when creating the button, check DisplayCompletedLines is false and set the _button.Background to black.

          If you want ColorFondoOff to hold a different brush value, then assign ColorFondoOff a different brush value.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #20
            Hello anmir55,

            In AddButtonToToolbar(), when creating the button, check DisplayCompletedLines is false and set the _button.Background to black.
            You are doing this check in OnButtonBuyClick(), but you are not doing this in AddButtonToToolbar().

            If you want ColorFondoOff to hold a different brush value, then assign ColorFondoOff a different brush value.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #21
              Thank you for your help

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              576 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              334 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              101 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              553 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              551 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X