App designer - adding tag to objects

24 views (last 30 days)
Roohollah
Roohollah on 17 Oct 2023
Commented: Roohollah on 18 Oct 2023
This is my first experience with MATLAB App Designer.
Since MATLAB is going to remove guide, I want to learn how to work with app designer.
Unlike guide, in app designer when I specify a tag in IDENTIFIERS section, I cannot call the object using its tag. Instead I have to use the name given by matlab. For example, when I add a text area, MATLAB gives the name TextArea by default to the obejct and I am not able to change it. If I need to add multiple text areas, then it becomes confusing to distinguish between them.
how can I fix this issue? What is the use of the tag in App Designer?

Accepted Answer

dpb
dpb on 17 Oct 2023
Edited: dpb on 17 Oct 2023
"..., when I add a text area, MATLAB gives the name TextArea by default to the obejct and I am not able to change it."
Ah, but you can change it (or any other control) to whatever you want. Select the control you want and use F2 and it will let you rename the control. It then becomes app.MySpecificTextArea and you're all set...
You can find out all about using App Designer in the doc tutorial, <the specific subsection> explains all about naming/labels including customizing them.
I never built a GUI using GUIDE (I don't do GUIs in general) so I don't know anything at all about how it identified its controls programmatically, but with AppDesigner, the Tag property is just that; user data associated with the particular control but has nothing to do with its name for identification programmatically.
  1 Comment
Roohollah
Roohollah on 18 Oct 2023
If you right click on the name given by matlab, you can rename it to whatever you want.

Sign in to comment.

More Answers (0)

Categories

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

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!