[Overview][Types][Classes][Procedures and functions][Index] Reference for unit 'ExtCtrls' (#lcl)

TCustomControlBar.Paint

Draws the control with its image, decorations, and visible bands.

Declaration

Source position: extctrls.pp line 1644

protected procedure TCustomControlBar.Paint; override;

Description

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:

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

TCustomControlBar.DrawingStyle

  

Fill style used for bands on the control bar.

TCustomControlBar.GradientStartColor

  

Specifies the initial color used in a gradient drawn on the control bar.

TCustomControlBar.GradientEndColor

  

Specifies the ending color used in a gradient drawn on the control bar.

TCustomControlBar.Picture

  

Optional image drawn before the visible bands for the control bar.

TCustomControlBar.DoBandPaint

  

Signals the OnBandPaint event handler using the specified arguments.

TCustomControlBar.OnBandPaint

  

Event handler signalled to render a visible band on the specified control with the specified paint options.

TCtrlBand.Control

  

Contains the control displayed on the band.

TBandPaintOptions

  

Set type used to store values from the TBandPaintOption enumeration.

TBandPaintOption

  

Represents the paint options enabled when drawing a TControlBar.

TCanvas.Draw

  

Draws the image content in SrcGraphic on the canvas at the specified position.

TCanvas.Frame3D

  

Draws a frame for the specified rectangle with a 3-dimensional appearance.

TCanvas.GradientFill

  

Fills a rectangle with a color gradient using the specified colors in a given direction.

TCustomPanel.Paint

  

Paints the panel including the bevels and caption defined for the control.

TCustomControl.Canvas

  

The drawing surface for the control.

TControl.IsRightToLeft

  

True when BiDiMode is not bdLeftToRight.

TWinControl.WMPaint

  

Manages paint requests, and handles double buffering.

TWinControl.PaintHandler

  

Handler for TLMPaint, manages the painting of child controls.


Version 4.0 Generated 2025-05-03 Home