Is There A Way to Rename the "app" Component In appdesigner?

8 visualizaciones (últimos 30 días)
When you start appdesigner, the canvas window contains a single UIFigure. You can access the UIFigure via syntax like "app.UIFigure..." So the main component I think is the "app" component (or main 'object', I'm not sure I have the correct phrasing). I want to rename the "app" component to "A" such that I would then access the UIFigure via syntax like "A.UIFigure...".
Is it possible to rename "app" to "A" and how is it done.
Thanks in advance.

Respuesta aceptada

Michael Cappello
Michael Cappello el 1 de Nov. de 2019
I called Mathworks technical support and asked them about this. Their response below.
Hello Michael,
I am writing in reference to your Technical Support Case #03859399 regarding naming of the app designer's main component.
Unfortunately, there is no way to change the name of the app's main component.
I will close this case but please let me know if you have any follow-up questions regarding this.
  2 comentarios
SergeyLA
SergeyLA el 6 de En. de 2025
If any way to manually rename child components (like tabs, edit fields etc)???
The topic is relevant becouse after copying some components AppDesigner add _2 (_3 etc) postfixes, and if initial component is later deleted - no renumeration is done by AppDesigner in automatic ways, and so you need forever reference component with _2 postfix! (which surely is not convinient!)
Image Analyst
Image Analyst el 6 de En. de 2025
@Michael Cappello, why would you want to? Just to save typing 2 letters?
@SergeyLA Yes, there is. With App Designer open, go to the "Component Browser" panel on the right hand side of the screen. Find the control you want to rename, like app.button_2. Double click on the name after the dot, like button_2, and it will be highlighted. Then just type in the name that you want and hit return, like "OpenImage" or whatever.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Develop uifigure-Based Apps en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by