Skip to main content

TcxCustomSplitter.AlignSplitter Property

Specifies the alignment of the splitter within its container.

Declaration

property AlignSplitter: TcxSplitterAlign read; write; default salLeft;

Property Value

Type Default
TcxSplitterAlign salLeft

Remarks

Use the AlignSplitter property to specify how the splitter is aligned within its container. The most common practice is to align the splitter to the same edge to which its bound control is aligned.

Suppose you want to have a resizable panel at the left of the form. In this case, the first thing to do is to place a panel onto the form and set its Align property to alLeft. Next, add a splitter control to the form and refer to the panel via the splitter’s Control property. Note that the splitter’s AlignSplitter property is automatically set to salLeft to match the panel’s alignment. Now you can run the application and resize the panel by dragging the splitter.

Note that in the simple example above, controls residing on the form will not be moved when the panel is resized. The usual practice to overcome this is to place another panel on the form and set its Align property to alClient so it occupies the remainder of the form’s client area. In this case, the new panel will be resized along with the first one.

Refer to the Using the TcxSplitter document for details on aligning splitters.

The table below lists all values available for the AlignSplitter property. Images in the table assume that there are four panels on the form aligned to its left, top, right and bottom edges. Thus, changing the AlignSplitter property will position the splitter next to one of these panels.

Property’s Value Description Example
salBottom The splitter is aligned to the bottom of its container. This alignment is used to resize controls that are aligned to the container’s bottom edge.
salLeft The splitter is aligned to the left of its container. This alignment is used to resize controls that are aligned to the container’s left edge.
salRight The splitter is aligned to the right of its container. This alignment is used to resize controls that are aligned to the container’s right edge.
salTop The splitter is aligned to the top of its container. This alignment is used to resize controls that are aligned to the container’s top edge.

Switching the bound control’s Align property to alLeft, alTop, alRight, or alBottom automatically adjusts the splitter’s position and alignment, overriding the splitter’s AlignSplitter property setting. The adjustment is made as if the AlignSplitter property is set to salLeft, salTop, salRight, or salBottom, respectively.

The default value of the AlignSplitter property is salLeft.

See Also