儲存儲存格框線的五個邊(Left、Right、Top、Bottom、Diagonal),每個邊都是一個帶自己樣式與色彩的
TXLSXBorderEdge,透過
TXLSXCellFormat brush 套用;
TXLSXBorders 是活頁簿層級的集區,會為相同的實例去重
語法
TXLSXBorder = class;
TXLSXBorderEdge = class;
TXLSXBorders = class;
主要成員
| Left, Right, Top, Bottom, Diagonal | 每個邊的唯讀 TXLSXBorderEdge |
| DiagonalUp, DiagonalDown | Boolean;要畫對角邊的哪個方向(兩者共用 Diagonal 邊的樣式/色彩) |
| SetAll | 一次呼叫設定全部五個邊的樣式(也可同時設色彩) |
| TXLSXBorderEdge.Style, .Color | 單一邊的 TXLSXBorderStyle 與 ARGB 色彩;ColorTheme/ColorIndex/TintAndShade 與 TXLSXFont 的色彩來源優先序一致(theme > indexed > RGB) |
| Add, Count, Items | TXLSXBorders 集區成員:附加新實例,以及列舉集區 |
範例
此範例在透過 CellFormat 設定格式的儲存格周圍畫細黑框,再單獨把上邊塗成紅色
CellFormat.Border.SetAll(xlsxBorderThin);
CellFormat.Border.Top.Color := $00FF0000;
另請參閱