Occurs after the column title specified by FieldIndex is saved into the
cell
Açıklama
You can use this event to apply conditional formatting to any header cell
Sözdizimi
TAfterTitle =
procedure(Sender: TObject; Cell:
IXLSRange; FieldIndex: Integer; Field: TField) of object;
| Sender |
TObject. Belirtir the TDataToXLS component that triggered the event |
| Cell |
IXLSRange which represents the cell with the column title |
| FieldIndex |
Integer. The index of the field |
| Field |
TField. An object that represents the field of dataset |
Örnek
This example sets the width of the column with index 2
procedure TForm1.DataToXLS1AfterTitle(Sender: TObject;
Cell: IXLSRange; FieldIndex: Integer; Field: TField);
begin
if FieldIndex = 2 then Cell.ColumnWidth := 30;
end;
This example shows how to change the text of column title