How to change pushbutton colour in Guide without pressing it ?
1 回表示 (過去 30 日間)
古いコメントを表示
Karthik Muthineni
2018 年 2 月 11 日
コメント済み: Saad Oussaada
2020 年 3 月 8 日
I have a GUI that reads the DHT11 sensor data attached to Arduino. I also have pushbutton in my GUI. Now, how do I change pushbutton colour based on incoming sensor data. For, example if the temperature is below 30 celsius then pushbutton should turn to Green otherwise it should turn to Red.
6 件のコメント
採用された回答
その他の回答 (1 件)
Walter Roberson
2018 年 2 月 11 日
You can set the BackgroundColor property of the uicontrol handle
handles.stop_button.BackgroundColor = [0.8 0 0] %red
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Migrate GUIDE Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!