Code covered by the BSD License  

Highlights from
uisplitter

5.0

5.0 | 1 rating Rate this file 9 Downloads (last 30 days) File Size: 9.18 KB File ID: #28841
image thumbnail

uisplitter

by Levente Hunyadi

 

26 Sep 2010

Splits a container into two resizable sub-containers (panes).

| Watch this File

File Information
Description

uisplitter divides a container into two sub-containers with a movable splitter. The container to split can be either a figure or a uipanel with no children. Depending on orientation, the splitter is either a vertical bar that separates a left and right pane (for horizontal orientation), or a horizontal bar that separates a bottom and top pane (for vertical orientation). If no container is specified, the figure returned by gcf is assumed as the parent container. Once the container is split, sub-containers may be freely populated with MatLab components. The relative size of the sub-containers may be adjusted interactively using the mouse, or programmatically from code.

This submission resembles UISplitPane by Yair Altman but uses fully documented MatLab functionality only. Usage is mostly compatible, and a wrapper function uisplitpane is available to exhibit a similar interface as UISplitPane. However, this submission is not meant to replicate Yair Altman's excellent submission: not all functionality may be available from UISplitPane.

SYNTAX

[panel1,panel2,splitter] = uisplitpane(parent, key, value, key, value, ...);
[panel1,panel2,splitter] = uisplitpane(key, value, key, value, ...);

EXAMPLES

% create a uisplitpane with default horizontal orientation
[left,right] = uisplitpane;

% create a uisplitpane with vertical orientation
[bottom,top] = uisplitpane('Orientation','vertical');

% create a uisplitpane explicitly specifying the parent container
fig = figure;
[bottom,top] = uisplitpane(fig,'Orientation','ver');

% create a pane where the left part is one third of the right.
[left,right] = uisplitpane('DividerLocation',0.25);

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
UISplitPane - Split a container (figure/frame/uipanel) into two resizable sub-containers
This submission has inspired the following:
mplot: Multiple plots in a single figure with list box selection

MATLAB release MATLAB 7.10 (2010a)
Other requirements The submission should be compatible with MatLab 2008a and later with few or no changes.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
28 Feb 2012 SSOI SS

Very well written codes, stable and useful.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
gui Levente Hunyadi 27 Sep 2010 10:04:44
split pane Levente Hunyadi 27 Sep 2010 10:04:44
splitter Levente Hunyadi 27 Sep 2010 10:04:44
oop per isakson 27 Sep 2010 17:38:15
drag and drop Levente Hunyadi 02 Oct 2010 06:12:39
drag and drop Borja 11 Apr 2011 14:43:15

Contact us at files@mathworks.com