Ocorre quando todos os títulos de coluna são salvos na Planilha
Descrição
Você pode usar este evento para aplicar formatação adicional a todo o cabeçalho
Sintaxe
TDBGridAfterTitles =
procedure(Sender: TObject; Range:
IXLSRange) of object;
| Sender |
TObject. Especifica TGridToXLS componente que triggered evento |
| Range |
IXLSRange. Representa um intervalo que contém todo o cabeçalho |
Exemplo
Este exemplo coloca uma borda espessa ao redor do cabeçalho
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;