跳到主要内容

GetTableRowPr

返回当前样式的表格行属性。

语法

expression.GetTableRowPr();

expression - 表示 ApiStyle 类的变量。

参数

此方法没有任何参数。

返回值

ApiTableRowPr

示例

通过样式设置文档中表格行的最小高度。

// How do I define the row height for a table using a style in a document?

// Enforce a consistent row size across a table by updating the style in a document.

let doc = Api.GetDocument();
let tableStyle = doc.CreateStyle("CustomTableStyle", "table");
let table = Api.CreateTable(2, 2);
table.SetWidth("percent", 100);
doc.Push(table);
table.SetStyle(tableStyle);
table.SetTableLook(true, true, true, true, false, false);
tableStyle.GetTableRowPr().SetHeight("atLeast", 1440);
tableStyle.GetConditionalTableStyle("topLeftCell").GetTableCellPr().SetShd("clear", 255, 111, 61);
tableStyle.GetConditionalTableStyle("topRightCell").GetTableCellPr().SetShd("clear", 51, 51, 51);
tableStyle.GetConditionalTableStyle("bottomLeftCell").GetTableCellPr().SetShd("clear", 128, 128, 128);
tableStyle.GetConditionalTableStyle("bottomRightCell").GetTableCellPr().SetShd("clear", 255, 213, 191);