Documentazione HotXLS

Evento AfterTitles

Si verifica quando tutti i titoli di colonna vengono salvati nel foglio di lavoro

Descrizione

È possibile utilizzare questo evento per applicare formattazione aggiuntiva all'intera intestazione

Sintassi

TDBGridAfterTitles = procedure(Sender: TObject; Range: IXLSRange) of object;
Sender TObject. Specifica TGridToXLS componente che triggered evento
Range IXLSRange. Rappresenta un intervallo che contiene l'intera intestazione

Esempio

Questo esempio applica un bordo spesso attorno all'intestazione
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;