TdxNavBarCustomSelectionPainter.DrawSelection(TCanvas,TRect,TColor,TdxNavBarObjectStates,TdxScaleFactor) Method
Draws the selection within a specified rectangle.
Declaration
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.