Documentazione HotXLS

AfterTitles evento

Si verifica dopo che tutti i titoli di colonna vengono salvati nel Worksheet

Descrizione

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

Sintassi

TAfterTitles = procedura(Sender: TObject; Range: IXLSRange) of object;
Sender TObject. Specifica il componente TDataToXLS che ha generato l'evento
Range IXLSRange. Rappresenta un intervallo che contiene l'intera intestazione

Esempio

Questo esempio applica un bordo spesso attorno all'intestazione
procedure TForm1.DataToXLS1AfterTitles(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;