TCustomControlBar.Paint procedure
Draws the control with its image, decorations, and visible bands.
Declaration
procedure Paint; overrideDescription
Paint is an overridden method in
TCustomControlBar used
to render the control bar and its bands on the Canvas for the control.
Paint calls the inherited method (in TCustomPanel) on entry to draw the outer bevels and Caption text for the control. It performs additional actions needed to draw the image, decorations, and visible bands on the control. These action include:
- Adjusts the clipping rectangle on the Canvas to account for the inner bevel on the control (when used).
- Draws the bitmap in Picture (when assigned) with space reserved for the bevels on the control.
- Draws the visible bands on the control using the default TBandPaintOption settings for the control ([bpoGrabber, bpoFrame, bpoGradient, bpoRoundRect]). Calls DoBandPaint to draw the Control on each of the visible TCtrlBand instances.
Use OnBandPaint to perform custom drawing operations needed to draw a specific band on the control. Use OnPaint to perform custom drawing operations needed for the control bar. The default PaintHandler (in TWinControl) is used when the OnPaint has not been assigned.
Set DrawingStyle to dsGradient to enable color gradients on the background for the bands. Use GradientStartColor and GradientEndColor to specify the colors used in the gradient.
The grabber for the bands are aligned to the edge indicated by IsRightToLeft.
Paint calls DoBandPaint to draw the Control for each of the visible TCtrlBand instances. Use OnBandPaint to perform custom drawing operations needed to draw a specific band on the control. Use OnPaint to perform custom drawing operations needed for the control bar.
Paint is called when the LM_PAINT message is received and handled for the control in the WMPaint method. The default PaintHandler (in TWinControl) is called when OnPaint has not been assigned.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
