Change button color and text after it is clicked
조회 수: 16 (최근 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!