Is there an easier way to disable all the buttons in matlab app designer?

조회 수: 44 (최근 30일)
Namita Gera
Namita Gera 2022년 4월 15일
댓글: Matt J 2022년 6월 3일
I wanted to know if there is an easier way to disable or enable all the buttons without calling each one separately. I was hoping to be able to press a start button which would then enable all the buttons in the app.
app.Button_1.Enable = "off";
app.Button_2.Enable = "off";
app.Button_3.Enable = "off";
app.Button_4.Enable = "off";
app.Button_5.Enable = "off";
app.Button_6.Enable = "off";
app.Button_7.Enable = "off";
app.Button_8.Enable = "off";
app.Button_9.Enable = "off";

답변 (1개)

Matt J
Matt J 2022년 4월 15일
편집: Matt J 2022년 4월 15일
h= findobj(app.UIFigure,'Type','uibutton');
set(h,'Enable','off')
  댓글 수: 4
Matt J
Matt J 2022년 6월 3일
@Gert Persson's comment moved here:
Yes, this will work fine for me!
Thanks a lot for your help Matt!
Matt J
Matt J 2022년 6월 3일
You're welcome, but please Accept-click the answer to indicate that it helped.

댓글을 달려면 로그인하십시오.

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by