Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Buttons 1-2-3-4-5 only 1 of them can be on

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

    Buttons 1-2-3-4-5 only 1 of them can be on

    Hi

    I have 5 Buttons on my chart and they are working fine individually.

    What I would like is that if I turn ON for example Home and some other button is already ON, it would turn OFF that other button

    It is probably something simple but I just cant figure it out

    Thanks in advance for the help

    #2
    Well, in the event when one of the buttons is clicked, why don't you do something like change the background color (or another visual property) of the buttons? In the handler for pressing button 1, set button 1 to the "active" color (let's say yellow) and set the colors of the other four to the "inactive color" (let's say grey)? If you are a little clever, you can probably write it such that all five are handled in one event handler that works in a general way, but you can easily just write five small "onclick" handlers each of which does the right thing for its own button.
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    Comment


      #3
      Originally posted by QuantKey_Bruce View Post
      Well, in the event when one of the buttons is clicked, why don't you do something like change the background color (or another visual property) of the buttons? In the handler for pressing button 1, set button 1 to the "active" color (let's say yellow) and set the colors of the other four to the "inactive color" (let's say grey)? If you are a little clever, you can probably write it such that all five are handled in one event handler that works in a general way, but you can easily just write five small "onclick" handlers each of which does the right thing for its own button.
      Thank you that helped got it to work

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      25 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      121 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      64 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      41 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X