MATLAB Answers

How do I change the order of objects in the App Designer component browser?

163 views (last 30 days)
How do I change the order of objects in the App designer component browser? Is it possible to reorder items in the same container?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 7 Oct 2019
The component browser will update when items are moved inside others. If you drag a "UIAxes" object into a tab, it should appear under that tab in the component browser.
You can also select another tab by clicking on it in the design view.
There is currently no way to reorder objects in the component browser itself. The objects in the component browser are ordered based on the sequence in which they were added to the containing object.

  4 Comments

Show 1 older comment
Marc Youcef
Marc Youcef on 23 Aug 2019
It is in fact a common request to be able to modify tab index order or at least change easely Components Order
Mario Malic
Mario Malic on 9 Sep 2020
For me, it's useful, because when you're entering a field value, clicking tab will move the selection to the next field value in the component browser. So, kinda makes sense to reorder.

Sign in to comment.

More Answers (3)

Leonardo von Lerchenfeld
Leonardo von Lerchenfeld on 21 Jun 2018
You can cut (CTRL + X) the objects and include them (CTRL+ V), then the objects will inserted at the end in the component list while maintaining their positions. Do this process in the order you like your objects. (I use MATLAB R2017a.)

  3 Comments

Mario Malic
Mario Malic on 23 Aug 2020
For me it worked fine without breaking callbacks.
Just make sure to change the property names if you are assigning values from EditField.Value
Robert
Robert on 2 Oct 2020
This works wonders, thank you! Keep in mind that when using panels or other containers, you have to select the panel/container before pasting, otherwise the parenting and positioning is incorrect.

Sign in to comment.


CallumP
CallumP on 13 Jun 2019
I've made an app that can do that. Might be a bit late for you but hopefully useful to others. It's here: https://uk.mathworks.com/matlabcentral/fileexchange/71838-hierarchyviewer

  4 Comments

Show 1 older comment
Peter Franz Zajac
Peter Franz Zajac on 16 Jul 2020
I just want to my thanks as well! I can recommend everyone encountering the same problem CallumP's app.
Adam Danz
Adam Danz on 16 Aug 2020
Nice function, CallumP!
Update: Starting in Matlab r2020b, change the stack order of UI components in App Designer using the reorder tool (see release notes).

Sign in to comment.


Adam Danz
Adam Danz on 28 Nov 2020
For Matlab r2020b and later, the stack order of UI components can be changed using the reorder tool (see release notes).
For earlier releases, see CallumP's function on the file exchange.

  0 Comments

Sign in to comment.

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!