Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Button color state
Collapse
X
-
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?
-
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
-
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
-
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
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
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
334 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
553 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment