Torque3D Documentation / _generateds / GuiSplitContainer

GuiSplitContainer

consoledoc.h

A container that splits its area between two child controls.

More...

Splitter

Options to configure split panels contained by this control

Whether to split between top and bottom (horizontal) or between left and right (vertical).

int

Width of the splitter bar between the two sides. Default is 2.

Point2I

Point on control through which the splitter goes.

Which (if any) side of the splitter to keep at a fixed size.

int

Width of the fixed panel specified by fixedPanel (if any).

Public Functions

void
setSplitPoint(Point2I splitPoint)

Set the position of the split handle.

Detailed Description

A container that splits its area between two child controls.

A GuiSplitContainer can be used to dynamically subdivide an area between two child controls. A splitter bar is placed between the two controls and allows to dynamically adjust the sizing ratio between the two sides. Splitting can be either horizontal (subdividing top and bottom) or vertical (subdividing left and right) depending on orientation.

By using fixedPanel, one of the panels can be chosen to remain at a fixed size (fixedSize).

// Create a vertical splitter with a fixed-size left panel.
%splitter = new GuiSplitContainer()
{
   orientation = "Vertical";
   fixedPanel = "FirstPanel";
   fixedSize = 100;

   new GuiScrollCtrl()
   {
      new GuiMLTextCtrl()
      {
         text = %longText;
      };
   };

   new GuiScrollCtrl()
   {
      new GuiMLTextCtrl()
      {
         text = %moreLongText;
      };
   };
};

note:

The children placed inside GuiSplitContainers must be GuiContainers.

Splitter

Options to configure split panels contained by this control

GuiSplitOrientation orientation 

Whether to split between top and bottom (horizontal) or between left and right (vertical).

int splitterSize 

Width of the splitter bar between the two sides. Default is 2.

Point2I splitPoint 

Point on control through which the splitter goes.

Changed relatively if size of control changes.

GuiSplitFixedPanel fixedPanel 

Which (if any) side of the splitter to keep at a fixed size.

int fixedSize 

Width of the fixed panel specified by fixedPanel (if any).

Public Functions

setSplitPoint(Point2I splitPoint)

Set the position of the split handle.