How to disable a button later in the program on gui

조회 수: 52 (최근 30일)
Zayne
Zayne 2011년 9월 8일
댓글: Zoya Saevna 2021년 7월 3일
I want to disable the roll button of a dice,after the player of my snakes and ladders program,has landed on 100......what function can I use to disable the button???

채택된 답변

Paulo Silva
Paulo Silva 2011년 9월 8일
%assuming you are using GUIDE and the button is called pushbutton1
set(handles.pushbutton1,'Enable','off')
After the code that rolls the dice finishes re-enable the button
%assuming you are using GUIDE and the button is called pushbutton1
set(handles.pushbutton1,'Enable','on')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Dialog Boxes에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by