Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxDockingController.SelectionBrush Property

Specifies the brush used to paint docking and resizing selections.

#Declaration

Delphi
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.

Delphi
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