Change button color and text after it is clicked
5 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Chandra Kurniawan
2012-1-6
in the pushbutton callback write:
set(handles.pushbutton1,'string','running','enable','off');
3 个评论
更多回答(2 个)
Sagar
2013-7-4
But how to change the color of the text that gets printed onto the pushbutton when it is clicked ?
1 个评论
Nikhil Magdum
2014-2-28
set(handles.pushbutton1,'string','running','ForegroundColor','red','enable','off');
munib chauhan
2017-2-23
you can use this also for text and color change set(handles.togglebutton1,'string','ON','enable','on','BackgroundColor','green');
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!