App designer - adding tag to objects

24 visualizaciones (últimos 30 días)
Roohollah
Roohollah el 17 de Oct. de 2023
Comentada: Roohollah el 18 de Oct. de 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?

Respuesta aceptada

dpb
dpb el 17 de Oct. de 2023
Editada: dpb el 17 de Oct. de 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 comentario
Roohollah
Roohollah el 18 de Oct. de 2023
If you right click on the name given by matlab, you can rename it to whatever you want.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by