How to change pushbutton colour in Guide without pressing it ?
1 次查看(过去 30 天)
显示 更早的评论
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!