mcUIControls - mcUISplitter

A splitter is a user interface component placed between two panels so that the user can adjust their sizes.

Vertical Splitter - Raised | Vertical Splitter - Sunken | Horizontal Splitter | Min/Max Testing | Details | w3Schools splitter


Vertical Splitter - Raised

This example uses a table to hold two panels and a vertical splitter between them because a table will restrict the width of the panels.

aa
bb
  This colors the splitter bar - this would normally be colored via the background, not this.


Vertical Splitter - Sunken

Another vertical test - using sunken panels. There is an extra slightly larger outside div to provide the background color.

aa
bb


Horizontal Splitter

Test of horizontal panels - the dark grey color was just to help set the sizes

The initial splitter bar position is set via height:250px in the first panel

aa
bb


Min/Max Testing

The min and max positions of the splitter default to 50px from either extreme.

If the actual height or width of the first (left or top) panel is less than the default, then that is used as the default.

In this testcase, the first panel does not set a default width.

aa
bb

In this testcase, the first panel does not set a default height.

aa
bb


Details

If you want to manually set the min and max values for the splitter, use code like this Adding a parameter to set this automatically would require too much testing.

These are the required libraries - mcUISplitter.js creates it own stylesheet.


w3Schools splitter

Some comments about the w3Schools splitter used on most example pages.


Author: Robert Clemenzi
URL: http:// mc-computing.com / Languages / Javascript / mcUIControls / mcUISplitter.html