Change button color and text after it is clicked
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Raldi
il 6 Gen 2012
Risposto: munib chauhan
il 23 Feb 2017
Hi all, i was wondering if there is a way to change the color and text of a button created with "guide". For example if it is clicked it should say running... and not being clicked anymore?
0 Commenti
Risposta accettata
Chandra Kurniawan
il 6 Gen 2012
in the pushbutton callback write:
set(handles.pushbutton1,'string','running','enable','off');
3 Commenti
Più risposte (2)
Sagar
il 4 Lug 2013
But how to change the color of the text that gets printed onto the pushbutton when it is clicked ?
1 Commento
Nikhil Magdum
il 28 Feb 2014
set(handles.pushbutton1,'string','running','ForegroundColor','red','enable','off');
munib chauhan
il 23 Feb 2017
you can use this also for text and color change set(handles.togglebutton1,'string','ON','enable','on','BackgroundColor','green');
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!