Change the Color of the Switch in the app designer?

30 Ansichten (letzte 30 Tage)
Jay Vaidya
Jay Vaidya am 8 Jun. 2021
Kommentiert: aamir ibrahim am 9 Sep. 2024
I am using app designer and I would like to change the color of the switches. Available switch options were 'Rocker Switch', 'Toggle Switch' and 'Switch' but neither of them has a .Color attribute.
I know I can use a lamp instead to display the status of the switch but I would like to change the color of the switch if possible.
Or I would like to have 'On' or 'Off' but only one of the two visible when the switch is in either of the states.
Thanks in advance!

Akzeptierte Antwort

Timor
Timor am 8 Jul. 2021
I added a lamp on top of the switch at the "on" position that is visible only when switch value is "on". works nice.
  2 Kommentare
Liam Vanderschaaf
Liam Vanderschaaf am 7 Jan. 2022
Love this idea, but how did you do it? Whenever I try to drag a lamp onto the switch, the switch gets replaced.
Maruan Alberto Bracci
Maruan Alberto Bracci am 18 Jan. 2023
Then you can't click the lamp to turn off the switch, but you have to click in the gray area. Does it have the same behavior for you too?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Reshma Nerella
Reshma Nerella am 11 Jun. 2021
Hi,
Currently we do not support Color property for Switch components. I have brought this issue to the notice of the concerned people and it might be considered for a future release.
  3 Kommentare
Jiri Hajek
Jiri Hajek am 11 Mai 2022
This would be much appreciated...
aamir ibrahim
aamir ibrahim am 9 Sep. 2024
Is this available now? I am working with 2023a and still don't see this.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange

Produkte


Version

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by