MATLAB Answers

How can I click a push button programmatically in App Designer?

101 views (last 30 days)
One of my pushbuttons when clicked does a bunch of calculations and I was wondering how to 'click' it in some other part of my code.
I know that I can create a helper function instead but I wanted to know if it was possible to just 'click' the button programmatically.

  0 Comments

Sign in to comment.

Accepted Answer

Kojiro Saito
Kojiro Saito on 1 Aug 2019
You can call the button pushed callback function programmatically, so if your callback looks like this,
% Button pushed function: Button
function ButtonPushed(app, event)
% Do something
end
you can call it by the following.
ButtonPushed(app, matlab.ui.eventdata.ButtonPushedData)

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.