SetCellBorderTop
设置应在当前表格单元格顶部显示的边框。
语法
expression.SetCellBorderTop(fSize, oApiFill);
expression - 表示 ApiTableCell 类的变量。
参数
| 名称 | 必需/可选 | 数据类型 | 默认值 | 描述 |
|---|---|---|---|---|
| fSize | 必需 | mm | 当前边框的宽度。 | |
| oApiFill | 必需 | ApiFill | 用于填充当前边框的颜色或图案。 |
返回值
此方法不返回任何数据。
示例
此示例设置应在表格单元格顶部显示的边框。
// How to set cell top border with its fill color.
// Create table and set its cell top border.
const presentation = Api.GetPresentation();
const slide = presentation.GetSlideByIndex(0);
const table = Api.CreateTable(2, 4);
const row = table.GetRow(0);
const cell = row.GetCell(0);
const fill = Api.CreateSolidFill(Api.RGB(51, 51, 51));
cell.SetCellBorderTop(2, fill);
slide.RemoveAllObjects();
slide.AddObject(table);