figH = figure; % East panel has a fixed width of 100 pixels panel1 = BorderLayout(figH, 0, 0, 100, 0); % The South panel (within the East panel) % has a fixed width of 80 pixels panel2 = BorderLayout(panel1.East, 0, 80, 0, 0); uicontrol(... 'String' , 'I''m fixed in size', ... 'Units' , 'Normalized' , ... 'Position', [0 0 1 1] , ... 'Parent' , panel2.South );Brian also made this post to the MATLAB Desktop Blog. Comments? Tell us about other GUI building utility tools from the File Exchange that you found useful. Written by Jiro Doke, Senior Applications Engineer, The MathWorks, Inc.
Get the MATLAB code Published with MATLAB® 7.5
Comments are closed.
1 CommentsOldest to Newest
I was most dismayed when I saw that as of 2008/10/07 only 178 people had downloaded this package from the File Exchange. It has a simple and clear interface that would save tens of lines of code in manual resizeFcns.
My only thought for its lack of popularity is that it appears to only be used for programmatically developed GUIs and not those developed in GUIDE.
An expansion of this to be able to work with GUIDE would be most useful. I would expect you could use each uicontrol’s ‘userdata’ field to store the alignment properties and have a master resize function that can be set to the root Figure to align all controls as desired.