How do I set the container of an App Designer component?
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am working on a large app in app designer and need to move some components around. The app has 6 layered containers (i.e. tabs) that the user can select on the left. I finally figured out that I can rearrange components that are not on the default/home tab by changing the visibility of the containers. However, when I go to a different tab in the "Design View" and drag a component, it is automatically moved to a different container or tab. How can I stop this behavior?
Thanks
0 comentarios
Respuestas (1)
TED MOSBY
el 20 de Ag. de 2025 a las 11:51
Hi,
Open the Component Browser and drag the component under the target container (Panel/Tab/GridLayout), When dropped, App Designer changes the parent; the tree updates to show the component nested under the new container. Hence you can verify the target container there.
Every App Designer UI component has a Parent you can set. Assign it to the destination container (panel, tab, grid, etc.). If the destination uses a GridLayout, also set the component’s Layout position.
% Example: move a button from Panel1 to Tab2
app.Button.Parent = app.Tab2; % re-parent
% If Tab2 contains a GridLayout:
app.Button.Parent = app.GridLayout2; % new parent is the grid
app.Button.Layout.Row = 2; % place it
app.Button.Layout.Column = [1 2];
Here is some documentation for reference:
Hope this helps!
0 comentarios
Ver también
Categorías
Más información sobre Develop Apps Using App Designer 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!