Xảy ra khi tất cả tiêu đề cột được lưu vào Worksheet
Mô tả
Bạn có thể dùng sự kiện này để áp dụng định dạng bổ sung cho toàn bộ phần tiêu đề
Cú pháp
TDBGridAfterTitles =
procedure(Sender: TObject; Range:
IXLSRange) of object;
| Sender |
TObject. Chỉ định thành phần TGridToXLS đã kích hoạt sự kiện |
| Range |
IXLSRange. Biểu thị một vùng chứa toàn bộ phần tiêu đề |
Ví dụ
Ví dụ này đặt viền dày xung quanh phần tiêu đề
procedure TForm1.GridToXLS1AfterTitles(Sender: TObject;
Range: IXLSRange);
begin
With Range.Borders do begin
Item[xlEdgeBottom].LineStyle := xlContinuous;
Item[xlEdgeBottom].Weight := xlThick;
Item[xlEdgeTop].LineStyle := xlContinuous;
Item[xlEdgeTop].Weight := xlThick;
Item[xlEdgeLeft].LineStyle := xlContinuous;
Item[xlEdgeLeft].Weight := xlThick;
Item[xlEdgeRight].LineStyle := xlContinuous;
Item[xlEdgeRight].Weight := xlThick;
end;
end;