An element which should appear before or after an element inside a container. When the splitter is dragged, the sibling elements of the splitter are resized. If a grippy
is placed inside the splitter, one sibling element of the splitter is collapsed when the grippy is clicked.
More information is available in the XUL tutorial.
<!-- This bar has some styling associated with it. The vbox is used to hold the .png image that a user clicks on to resize the search bar.--> <splitter tooltiptext="Resize the Search Box" oncommand="alert('The splitter was dragged')"> <vbox id="example_vbox" /> </splitter>
collapse
splitter
is collapsed when its grippy is clicked. If this attribute is not specified, the splitter will not cause a collapse. You should put a grippy
element inside the splitter when it is used for collapsing.none
before
after
both
resizeafter
splitter
should be resized when the splitter is repositioned.closest
farthest
grow
flex
resizebefore
splitter
should be resized when the splitter is repositioned.closest
farthest
flex
state
splitter
has collapsed content or not. This attribute will be updated automatically as the splitter is moved, and is generally used in a stylesheet to apply a different appearance for each state.open
collapsed
dragging
substate
before
after
Inherited Properties |
The following classes may be used to style the element. These classes should be used instead of changing the style of the element directly since they will fit more naturally with the user's selected theme.
tree-splitter
treecol
elements). The splitter will be drawn with no width so that it isn't visible, however, the columns may still be resized.<tree id="tree1" flex="1" height="300" enableColumnDrag="true"> <treecols> <treecol id="name" label="Name" flex="1"/> <splitter class="tree-splitter"/> <treecol id="id" label="ID" flex="1"/> <splitter class="tree-splitter"/> <treecol id="date" label="Date" flex="1"/> <splitter class="tree-splitter"/> </treecols> <treechildren/> </tree>
The degree to which a splitter will resize a box, and what happens during the resize and after the limit is reached, depends on the height (or width) specified for the box as an attribute or in CSS, the min-height (or min-width), the intrinsic height of the box contents, and the presence or absence of a collapse attribute on the splitter.
For:
<vbox></vbox> <splitter/> <vbox></vbox>
...the splitter will not move, unless there is a collapse attribute on the splitter, which will cause it to collapse as soon as it is dragged.
For:
<vbox/> <splitter/> <vbox height="500"> <vbox height="100"/> </vbox>
...the splitter can be dragged down to the 100px intrinsic height of the lower box, where it will stop (or collapse if the splitter has a collapse attribute).
For:
<vbox/> <splitter/> <vbox height="500" minheight="200"> <vbox height="100"/> </vbox>
...the splitter can be dragged down to the 200px minheight, where it will stop or collapse.
For:
<vbox/> <splitter/> <vbox height="500" style="min-height: 50"> <vbox height="100"/> </vbox>
...the splitter can be dragged down below the 100px intrinsic height of the lower box, causing the child box to overflow, until reaching the min-height, at which point it will stop or collapse. That should also work with a minheight attribute specifying a value less than the intrinsic height. (However, because of bug 513597, only specifying both minheight and minwidth attributes, or specifying min-height or min-width in CSS, actually works to allow overflow.)