เอกสาร HotXLS

อีเวนต์ AfterTitles

เกิดขึ้นหลังจากบันทึกชื่อคอลัมน์ทั้งหมดลงในแผ่นงาน

ไวยากรณ์

ตัวอย่างนี้แสดงวิธีใช้อีเวนต์ AfterTitles

ตัวอย่าง

TAfterTitles = procedure(Sender: TObject; Range: IXLSRange) of object;
Sender TObject. ระบุ TDataToXLS component that triggered event
Range IXLSRange. แทน ช่วง which contains ทั้งก้อน header

ตัวอย่าง

This example puts the thick border around the header
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;