## Splitter

### Description

The Splitter class implements the Splitter control. This is a vertical or horizontal line control, which allows the user to change the relative sizes of the controls on a window. For example, you might have a list box and a text edit, and use a Splitter to allow the user to move the boundary between them.

To do this, you first set up the leftmost (or topmost) control or controls, using the `align` property to align to the left (or top). You then create the Splitter, defining its position with the `where` property. Then you create the rightmost (or bottom) control, setting its `align` property to fill the remaining client area of the parent, as shown in the example below.

If the Splitter `style` is 0 (the default), it has the normal bevelled appearance. If `style` is 1, it is not bevelled. (This parameter is ignored under MacOS).

The `limit` property is a numeric scalar, which sets the minimum size of the panes in the current `scale`. The default is 0.

### Example

         ’DEMO_Splitter;TEXT;DEMO
    [1]   © Sample function demonstrating use of the Splitter object
    [2]   © We set up a list box and multiline edit fields, aligned to the
    [3]   © left in each case, with a splitter between them
    [4]   DEMO„'Œ' ŒNEW 'Window' ª DEMO.scale„5
    [5]   DEMO.title„'Splitter Example'
    [6]   ©
    [7]   © Set up the list box
    [8]   DEMO.List1.New 'List' ª DEMO.List1.align„2 ª DEMO.List1.size„50 100
    [9]   DEMO.List1.list„ŒM
    [10]  ©
    [11]  © Now create the splitter, just to the right of the list box
    [12]  DEMO.mySplitter.New 'Splitter' ª DEMO.mySplitter.where„0 102
    [13]  ©
    [14]  © Now create right edit object, aligned to fill remainder of client area
    [15]  DEMO.Edit1.New 'Edit' ª DEMO.Edit1.style„36 ª DEMO.Edit1.align„¯1
    [16]  DEMO.Edit1.color„0 0 0 225 255 255 ª DEMO.Edit1.border„0
    [17]  TEXT„'This is an example of a window with a splitter.'
    [18]  TEXT„TEXT,ŒR,ŒR,'Try re-sizing the window and moving the splitter around.'
    [19]  DEMO.Edit1.text„TEXT
    [20]  ©
    [21]  © Wait for the user to close the window
    [22]  0 0½ŒWE DEMO
         ’

### Properties

align anchors aquaadjust autodraw caption children class color data dragsource droptarget enabled events extent handle limit maxsize methods minsize name opened order pointer properties scale self size sourceformats style targetformats tie units visible where

### Methods

Click Clienttoscreen Close Create Delete Hide New Open Paint Resize Screentoclient Send Set Show Trigger

### Callbacks

onChange onClick onClose onDblClick onDestroy onDragDrop onDragEnd onDragEnter onDragLeave onDragOver onDragStart onFocus onHide onKeyDown onKeyPress onKeyUp onMouseDown onMouseMove onMouseUp onOpen onSend onShow onUnFocus

Topic: APLX Help : System Classes : List of Classes : Splitter

[ Previous | Next | Contents | Index ]