Vcl.ExtCtrls.TCustomCategoryPanel.DrawHeaderCaption

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure DrawHeaderCaption(ACanvas: TCanvas); virtual;

C++

virtual void __fastcall DrawHeaderCaption(Vcl::Graphics::TCanvas* ACanvas);

Properties

Type Visibility Source Unit Parent
procedure
function
protected
Vcl.ExtCtrls.pas
Vcl.ExtCtrls.hpp
Vcl.ExtCtrls TCustomCategoryPanel

Description

Draws the caption of the header of the category panel.

Use DrawHeaderCaption to draw the caption of the category panel according to properties of the parent category panel group. The ACanvas parameter requires a TCanvas instance created with the window's device context assigned to the canvas's Handle property. This canvas instance should be freed after the DrawHeaderCaption is called.

The font used is specified in the HeaderFont from the category panel group parent. The Alignment property of the category panel and text flags setting of the canvas's BiDiMode property are use to draw the caption.

If the category panel group's HeaderStyle property is set to hsThemed and themes are enabled, the caption is drawn by the theme service DrawText function. Otherwise the caption is drawn using the Windows API DrawText function.

DrawHeaderCaption is a protected method and so can only be called in the implementation of an extended class of TCustomCategoryPanel.

See Also