RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomCategoryPanel.DrawHeaderCaption Method

Draws the caption of the header of the category panel.

Pascal
procedure DrawHeaderCaption(ACanvas: TCanvas); virtual;
C++
virtual __fastcall DrawHeaderCaption(TCanvas ACanvas);

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

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!