跳到主要内容

SetRowPr

为当前表格行设置属性。

语法​

expression.SetRowPr(oApiTableRowPr);

expression - 表示 ApiTableRow 类的变量。

参数​

名称必需/可选数据类型默认值描述
oApiTableRowPr必需ApiTableRowPr表格行属性。

返回值​

boolean

示例​

在演示文稿中设置表格行的属性。

// Useful for applying row properties to a table row.

// Set the height of the first row using row properties.

const presentation = Api.GetPresentation();
const slide = presentation.GetSlideByIndex(0);
const table = Api.CreateTable(2, 3);
const row = table.GetRow(0);
const rowPr = Api.CreateTableRowPr();
rowPr.SetHeight("atLeast", 720*3);
row.SetRowPr(rowPr);
slide.RemoveAllObjects();
slide.AddObject(table);