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

TdxNavBarCustomSelectionPainter.DrawSelection(TCanvas,TRect,TColor,TdxNavBarObjectStates,TdxScaleFactor) Method

Draws the selection within a specified rectangle.

#Declaration

Delphi
class procedure DrawSelection(ACanvas: TCanvas; ARect: TRect; ABackColor: TColor; AState: TdxNavBarObjectStates; AScaleFactor: TdxScaleFactor);

#Parameters

Name Type
ACanvas TCanvas
ARect TRect
ABackColor TColor
AState TdxNavBarObjectStates
AScaleFactor TdxScaleFactor

#Remarks

Use this method of TdxNavBarCustomSelectionPainter descendants to custom paint NavBar links via the OnCustomDraw.GroupClientForeground and OnCustomDraw.Link events.

The selection is used by Views to draw the background of pressed, selected and hot-tracked links.

Various TdxNavBarCustomSelectionPainter descendants implement the method using different effects to draw the selection: inflating/deflating and blending with a color.

The DrawSelection method draws the selection on the ACanvas canvas within a specific rectangular region (ARect). ABackColor specifies the color of the selection border for some painters (TdxNavBarBaseSelectionPainter and TdxNavBarVSToolBoxSelectionPainter). AState defines whether the selection is drawn for a selected, pressed or hot-tracked link). This property affects the selection color and specifies whether the selection region is painted raised or lowered.

Use the AScaleFactor parameter to scale the selection.

See Also