How to change the button names depending on different situations?

I'm referring to buttons within app-designer. For example,
I would want the button to be called "load" in one situation, and "plot" in another situation, even though they are the same button.
Many thanks.

 Accepted Answer

a=uicontrol;
a.String='load'
a.String='plot'

3 Comments

Thanks. My button is called app.A.
I tried to use :
app.A.String = 'load'
and get the below error:
Unrecognized property 'String' for class 'matlab.ui.control.Button'.

Sign in to comment.

More Answers (0)

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Products

Release

R2020b

Asked:

on 16 Mar 2021

Commented:

on 16 Mar 2021

Community Treasure Hunt

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

Start Hunting!