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

58 Ansichten (letzte 30 Tage)
Namita Gera
Namita Gera am 15 Apr. 2022
Kommentiert: Matt J am 3 Jun. 2022
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";

Antworten (1)

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

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Downloads finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by