How to change pushbutton colour in Guide without pressing it ?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Karthik Muthineni
am 11 Feb. 2018
Kommentiert: Saad Oussaada
am 8 Mär. 2020
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 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Walter Roberson
am 11 Feb. 2018
You can set the BackgroundColor property of the uicontrol handle
handles.stop_button.BackgroundColor = [0.8 0 0] %red
0 Kommentare
Siehe auch
Kategorien
Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!