App Designer: Keeping some components fixed size while resizing the rest
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 21 Mär. 2018
Beantwortet: MathWorks Support Team
am 21 Mär. 2018
I am designing an app with a plot and a control panel. I would like the plot to resize and the panel to have a fixed horizontal width when the user resizes the app window. Right now the behavior is such that both the plot and the panel both resize in x and y dimensions.
How can I accomplish this?
Akzeptierte Antwort
MathWorks Support Team
am 21 Mär. 2018
1. Set the "AutoResizeChildren" property to 'off' on the parent of the uipanel which needs to be of fixed width and write a SizeChangedFcn for it instead.
Write callback functions with the "SizeChangedFcn" property that would make the uipanel grows taller and make the axes grows wider and taller when the app is resized.
2. Leave AutoResizeChildren to 'on' on the uipanel (and any containers inside it), so that when the uipanel is made taller (via the SizeChangedFcn written above), the things inside the uipanel get auto resized.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!