Change the Color of the Switch in the app designer?
39 views (last 30 days)
Show older comments
Jay Vaidya on 8 Jun 2021
Commented: Maruan Alberto Bracci on 18 Jan 2023
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!
Timor on 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.
Maruan Alberto Bracci on 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?
More Answers (1)
Reshma Nerella on 11 Jun 2021
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.
Find more on Develop Apps Using App Designer in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!