Change the Color of the Switch in the app designer?

40 ビュー (過去 30 日間)
Jay Vaidya
Jay Vaidya 2021 年 6 月 8 日
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
Timor 2021 年 7 月 8 日
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 件のコメント
Liam Vanderschaaf
Liam Vanderschaaf 2022 年 1 月 7 日
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 2023 年 1 月 18 日
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?

サインインしてコメントする。

その他の回答 (1 件)

Reshma Nerella
Reshma Nerella 2021 年 6 月 11 日
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.
  2 件のコメント
Ruben Kopischke
Ruben Kopischke 2022 年 2 月 15 日
I'd love this as well
Jiri Hajek
Jiri Hajek 2022 年 5 月 11 日
This would be much appreciated...

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by