# Operating Splitter Controls

When you set a splitter control to any mode other than indicator mode, you can move or resize elements on a panel using the mouse or keyboard.

In order to use a splitter control to move or resize elements on a panel, you must attach other controls or panels to the splitter control. You can attach multiple controls and child panels to each side of the splitter—left and right or above and below.

Panels that you operate with a splitter control must be child panels.

When you hover over the splitter control, the cursor becomes a different icon, which you can specify. Click and drag the splitter either horizontally or vertically. When you drag the splitter, a drag line appears, parallel to the splitter and of the same length, that shows where the splitter is being dragged.

If you specify that the attached control or panel be resized, the controls and panels are sized so that the edge nearest to the splitter control preserves its distance from the splitter control. If you attach a control or panel to the right side of the splitter control and drag to the right, the control or panel becomes smaller. If you attach a control or panel to the left side of the splitter control and drag to the right, the control or panel becomes larger. You cannot size the control or panel past the point where any attached control or panel is reduced to its standard minimum size.

If you specify that the attached control or panel be moved, the controls and panels move so that the edge nearest to the splitter control preserves its distance from the splitter control. By default you cannot move the splitter control past the edge of the panel.

You also can operate the splitter using the keyboard. Make sure that the splitter has the keyboard focus and use the arrow keys. If you hold down the <Shift> key, you can move the splitter one pixel at a time.

To use a splitter control as a line decoration, select a classic-style splitter (CTRL_HORIZONTAL_SPLITTER or CTRL_VERTICAL_SPLITTER), set the color with ATTR_FRAME_COLOR, set the thickness with ATTR_FRAME_THICKNESS, and then set ATTR_OPERABLE_AS_INDICATOR to FALSE.

If you set the splitter control to indicator mode, you must enable the Operable as an Indicator option or set the ATTR_OPERABLE_AS_INDICATOR attribute to TRUE to interact with the control using the mouse. Setting the splitter to indicator mode prevents it from having the keyboard focus.