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

13 vues (au cours des 30 derniers jours)
Michael Cappello
Michael Cappello le 1 Nov 2019
Commenté : Image Analyst le 6 Jan 2025 à 18:46
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.

Réponse acceptée

Michael Cappello
Michael Cappello le 1 Nov 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 commentaires
SergeyLA
SergeyLA le 6 Jan 2025 à 17:11
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 le 6 Jan 2025 à 18:46
@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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Develop uifigure-Based Apps dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by