Speed up resizing of app designer gui

5 views (last 30 days)
I have a fairly large gui with daisy chained tab groups panels and many individual ui elements. Meanwhile, the time for resizing of the window has become inappropriately big. (>1min).
Inside the tab groups panels are distributed by a grid layout. The auto resize children option is on.
Are there any rules/suggestions how to avoid/debug long resize events?
Using the profile viewer during a resizing leads to this output:
2019-10-10 07_18_40-Profiler.png
Unfortunately this does not help me to improve my gui.
Thanks in advance,

Answers (1)

Alexandra McClernon Ownbey
For a gui, I always manually define the size a location of all my objects. I find it best to use normalized units. If I have several objects, say 3, that I want to distribute evenly within my figure, I just use ratios in the form of fractions for the height.
figure('units','normalized',...
'position',[0.3 0.3 0.3 0.3])
h.but1 = uicontrol('sytle','pushbutton',...
'units','normalized',...
'position',[0 2/3 0.3 1/3],...
'string','button1')
h.but2 = uicontrol('sytle','pushbutton',...
'units','normalized',...
'position',[0 1/3 0.3 1/3],...
'string','button2')
h.but3 = uicontrol('sytle','pushbutton',...
'units','normalized',...
'position',[0 0 0.3 1/3],...
'string','button1')
The position and sizing can always be changed later. I find it sometimes useful to reference the previous size, expecially if you are using uitable. (uitable has a property called 'extend' that lists the extension of the table so you don't have any remaining white space).
h.but1.Position = h.but1.Position + [0 0 0.2 -0.1];
Is this what you were refering to? Or is it something else in your gui that is slowing down resizing the whole figure?
  3 Comments
Alexandra McClernon Ownbey
Do you have any data stored/plotted in your gui? The GUI may be slow due to the amount of data held; this also goes for a large number of objects in the GUI. Have you also tried running it on a different machine?
Philipp Soentgerath
Philipp Soentgerath on 14 Oct 2019
During the run time serveral axes and one hugh table are created dynamically, but resizing is equally slow before and after this.
I think the sheer number of elements could be the problem. There are serveral hunderds of them, distributed over 8 tabs. So only ~100 are present in the figure. (Don't know if that helps). All other gui interactions still work fine without a bothering delay.
The problems occurs on every machine (3 pc with very similar configuration) and they are professional workstations.

Sign in to comment.

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!