跳到主要内容

SetCellBorderRight

设置应在当前表格单元格右侧显示的边框。

语法

expression.SetCellBorderRight(borderWidth, fill);

expression - 表示 ApiTableCell 类的变量。

参数

名称必需/可选数据类型默认值描述
borderWidth必需mm当前边框的宽度。
fill必需ApiFill用于填充当前边框的颜色或图案。

返回值

boolean

示例

在 PDF 中设置带有填充颜色的表格单元格右边框。

// How do I customize the appearance of the right edge of a cell in a PDF?

// Style the border on the right side of your table cell in a PDF.

const doc = Api.GetDocument();
const page = doc.GetPage(0);

const table = Api.CreateTable(2, 4);
const row = table.GetRow(0);
const cell = row.GetCell(0);
const fill = Api.CreateSolidFill(Api.CreateRGBColor(51, 51, 51));
cell.SetCellBorderRight(2, fill);

page.AddObject(table);