Skip to main content

TdxDockingController.SelectionBrush Property

Specifies the brush used to paint docking and resizing selections.

Declaration

property SelectionBrush: TBrush read; write;

Property Value

Type
TBrush

Remarks

When docking a control, a frame displays its potential docked position. When resizing, a bar indicates the potential position of the control’s edge. These frames and bars are painted using the brush specified by the SelectionBrush property. Note that this brush is actually inverted with respect to the background. This makes erasing the previously painted frame or bar possible. The inverted frame or bar is painted at the same position, resulting in restoring the initial colors.

If you need greater control over painting the docking frame or resizing bar, handle the OnCustomDrawDockingSelection and OnCustomDrawResizingSelection events of the docking manager. If you need to provide custom painting of these elements for particular dock controls, handle their OnCustomDrawDockingSelection and OnCustomDrawResizingSelection events.

The following sample code changes the SelectionBrush property value to provide changed painting of the docking frames and resizing bars.

var SelectBrush: TBrush;
// ...
SelectBrush := TBrush.Create;
SelectBrush.Color := clBlack;
SelectBrush.Style := bsFDiagonal;
dxDockingController.SelectionBrush := SelectBrush;

The image below displays the result of the sample code execution.

See Also