# IupSplit

Definition: | include pGUI.e Ihandle ih = IupSplit(Ihandln child1=NULL, Ihandln child2=NULL, string attributes="", dword_seq args={})
Description: | Creates a void container that splits its client area in two. Allows the provided controls to be enclosed in a box that can be expanded and contracted in one direction, but when one is expanded the other is contracted. It does not have a native representation, but it also contains an IupCanvas to implement the bar handler. child1: Identifier of an interface element that will be at left or top. child2: Identifier of an interface element that will be at right or bottom. For more information on the attributes and args parameters see IupSetAttributes. Returns: the identifier of the created element.
pwa/p2js: | Supported, but see +x? markers on individual attributes and callbacks.
Notes: | The controls that you want to be resized must have the EXPAND=YES attribute set. See the Layout Guide for mode details on sizes. If you set the MINMAX attribute for a direct child, IupSplit will respect that size. Nested children will also have their size limits respected. The IupCanvas bar handler is always the first child of the split. It can be obtained using IupGetChild or IupGetNextChild. The IupSplit control looks just like the IupSbox, but internally is very different. While the IupSbox controls only one element and can push other elements outside the dialog, the IupSplit balances its internal size and never pushes other elements outside its boundaries. The box can be created with no elements and later dynamically filled using IupAppend or IupInsert.
Attributes: |
AUTOHIDE | (non inheritable) if the child client area is smaller than the bar size, then automatically hide the child. Default: NO.
BARSIZE | (non inheritable) controls the size of the bar handler. Default: 5.
COLOR | Changes the color of the bar grip affordance. The value should be given in "R G B" color style. Default: "192 192 192".
ORIENTATION+ | (creation only) Indicates the orientation of the bar handler. The direction of the resize is perpendicular to the orientation. Possible values are "VERTICAL" or "HORIZONTAL". Default: "VERTICAL".
EXPAND | (non inheritable) The default value is "YES".
LAYOUTDRAG | (non inheritable) When the bar is moved automatically update the children layout. Default: YES. If set to NO then the layout will be updated only when the mouse drag is released.
MINMAX? | (non inheritable) sets minimum and maximum crop values for VALUE, in the format "%d:%d" [min:max]. The min value can not be less than 0, and the max value can not be larger than 1000. This will constrain the interactive change of the bar handler. Default: "0:1000". (Since 3.2)
SHOWGRIP | (non inheritable) Shows the bar grip affordance. Default: YES. When set to NO, the BARSIZE is set to 3. When set to NO if COLOR is defined then it is used to fill the grip area (since 3.11.1). If set to "LINES" then instead of the traditional grip appearance, it will be two parallel lines (since 3.11.1).
VALUE | (non inheritable) The proportion of the left or top (child1) client area relative to the full available area. It is an integer between 0 and 1000. If not defined or set to NULL, the Native size of the two children will define its initial size.
WID | (read-only) returns -1 if mapped.
also | FONT, NAME, SIZE+, RASTERSIZE+, CLIENTSIZE, CLIENTOFFSET, POSITION, MINSIZE, MAXSIZE: also accepted.
Callbacks: |
VALUECHANGED_CB | Called after the value was interactively changed by the user. (since 3.12) function valuechanged_cb(Ihandle ih) ih: identifier of the element that activated the event.
Example: | Natural Size After Moving the Split Bar