File Exchange Pick of the Week

Our best user submissions

GUI Layout (Part 7)

Jiro's pick this week is GUI Layout Toolbox by Ben Tordoff and David Sampson, who are MathWorks consultants from our UK office.

It's been a while since I highlighted a GUI layout entry. For those interested in looking at my previous posts, here they are: Part 1, Part 2, Part 3, Part 4, Part 5, Part 6.

This is the ultimate GUI Layout Toolbox. This toolbox contains layout utilities that integrate seamlessly with MATLAB UI components. In addition, it allows components to resize dynamically (by draggable dividers) and comes with a highly-requested tab component. The toolbox is fully developed using the MATLAB Class system.

If you think you're impressed with all the capabilities that it offers, wait until you take a look at the full documentation that it comes with. The documentation includes Examples, Function Reference Pages, and Getting Started section -- all the sections you see in our documentation.

Let's see this thing in action!

fh = figure('Units', 'Pixels', ...
   'OuterPosition', [100 100 500 500], ...
   'Toolbar', 'none', 'Menu', 'none');
p = uiextras.TabPanel('Parent', fh, ...      % Tab Component
   'Padding', 5 );
axes('Parent', p);                           % 1st Tab
b1 = uiextras.HBox('Parent', p, ...          % 2nd Tab - Horiz Box
   'Spacing', 5);
load table_data
uitable('Parent', b1, ...                    %   Left Box
   'Data', d, ...
   'RowName', '', ...
   'ColumnName', {'Property', 'Value'}, ...
   'ColumnWidth', {150,100});
b2 = uiextras.VBoxFlex('Parent', b1, ...     %   Right Box - Flex Vert Box
   'Spacing', 5);
uicontrol('Parent', b2, ...                  %     Top Box
   'Style', 'listbox');
uicontrol('Parent', b2, ...                  %     Middle Box
   'Style', 'listbox');
b3 = uiextras.HButtonBox('Parent', b2, ...   %     Bottom Box - Horz Button
   'ButtonSize', [100 25]);
uicontrol('Parent', b3, ...                  %       Left Button
   'String', 'Set');
uicontrol('Parent', b3, ...                  %       Right Button
   'String', 'Clear');

% Set Tab Names
set(p, 'TabNames', {'Main Plot', 'Settings'});

% Set sizes of boxes
set(b1, 'Sizes', [-1 205]);
set(b2, 'Sizes', [-1 -1 25]);


Let us know what you think here.

Published with MATLAB® 7.10



To leave a comment, please click here to sign in to your MathWorks Account or create a new one.