App designer - adding tag to objects
24 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
采纳的回答
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.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!