How to change pushbutton colour in Guide without pressing it ?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Karthik Muthineni
el 11 de Feb. de 2018
Comentada: Saad Oussaada
el 8 de Mzo. de 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 comentarios
Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 11 de Feb. de 2018
You can set the BackgroundColor property of the uicontrol handle
handles.stop_button.BackgroundColor = [0.8 0 0] %red
0 comentarios
Ver también
Categorías
Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!