يحدث بعد تصدير
dbgrid إلى Excel
الوصف
يمكنك استخدام هذا الحدث لتطبيق تنسيق إضافي على المنطقة المصدرة بالكامل
بناء الجملة
TDBGridAfterExport =
procedure (Sender: TObject; Range:
IXLSRange) of object;
| Sender |
TObject يحدد المكون TGridToXLS الذي أطلق الحدث |
| Range |
IXLSRange يمثل نطاقا يحتوي على المنطقة المصدرة بالكامل |
مثال
هذا المثال يضع الإطار السميك حول المنطقة المصدرة
procedure TForm1.GridToXLS1AfterExport(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;