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

11 views (last 30 days)
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.

Accepted Answer

Michael Cappello
Michael Cappello on 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 Comments
SergeyLA
SergeyLA on 6 Jan 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 on 6 Jan 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.

Sign in to comment.

More Answers (0)

Categories

Find more on Develop uifigure-Based Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!