About the minimum width of GUI
Ältere Kommentare anzeigen
I get a problem in making a small GUI, that is: A GUI is made and the width is set to 100 pixels, but it auto change it to 115 pixels. I am wondering why? If the width must be lager than a value (eg. 115 for my computer), can every computer screen is the same value? Thank you very much!
Akzeptierte Antwort
Weitere Antworten (1)
Jan
am 26 Mär. 2012
I confirm, that figures have a minimum width in Matlab 5.3 to 2011b under Windows:
figH = figure('Units', 'pixels', 'Position', [100,100,10,10])
get(FigH, 'Position')
>> ans =
100 100 132 10
But this differs from your 115 pixels. Try this to see the reason:
figure('menubar', 'none', 'toolbar', 'none', 'Units', 'pixels', 'Position', [100,100,10,10])
You see, that the header section of the created window contains the icon and the three buttons for minimizing, maximizing and closing. Therefore the minimal width depends on the width of these icons, which can be adjusted by the user.
You can override this limitation by using FEX: WindowAPI, but it is questionable if a window with partially concealed control buttons is user-friendly.
Kategorien
Mehr zu Environment and Settings finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!