property Header: TColumnHeader
Description
This property is responsible for the footer of the component.
The class has the following properties
Property |
Type |
Description |
Alignment |
TAlignment |
Sets the alignment of the header in the column. Available values: taCenter, taRightJustify, taLeftJustify |
Caption |
String |
Title text. |
Color |
TColor |
Header background color. Ignored if component property EnableVisualStyles = True |
DisplayMode |
TDisplayMode |
Defines the mode of displaying text and graphics in the header. Available values: dmImageOnly, dmTextAndImage, dmTextOnly |
Glyph |
TBitmap |
Allows you to put a bmp image in the header. |
Hint |
String |
A tooltip for the header. |
MultiLine |
Boolean |
Allows you to use multiple strings in the header. |
Orientation |
THeaderOrientation |
Defines the orientation of the header. Available values: hoHorizontal, hoVertical |
Example
// place the picture in the header
procedure Form1_TableGrid1_OnChange (Sender: TObject);
begin
Form1.TableGrid1.Columns[0].Header.DisplayMode := dmTextAndImage;
// get the image from Image1 placed on the form, the image must be in bmp format
Form1.TableGrid1.Columns[0].Header.Glyph.Assign(Form1.Image1.Picture.Bitmap);
end;