App designer - adding tag to objects

조회 수: 41 (최근 30일)
Roohollah
Roohollah 2023년 10월 17일
댓글: Roohollah 2023년 10월 18일
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?

채택된 답변

dpb
dpb 2023년 10월 17일
편집: dpb 2023년 10월 17일
"..., 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
Roohollah
Roohollah 2023년 10월 18일
If you right click on the name given by matlab, you can rename it to whatever you want.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

태그

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by