How to change pushbutton colour in Guide without pressing it ?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Karthik Muthineni
il 11 Feb 2018
Commentato: Saad Oussaada
il 8 Mar 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 Commenti
Risposta accettata
Più risposte (1)
Walter Roberson
il 11 Feb 2018
You can set the BackgroundColor property of the uicontrol handle
handles.stop_button.BackgroundColor = [0.8 0 0] %red
0 Commenti
Vedere anche
Categorie
Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!