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!