跳到主要内容

SetCellMarginBottom

指定表格中特定单元格的单元格内容底部 与边框之间应保留的空间量。

语法

expression.SetCellMarginBottom(nValue);

expression - 表示 ApiTableCell 类的变量。

参数

名称必需/可选数据类型默认值描述
nValue必需twips如果此值为 <code>null</code>,则使用默认表格单元格下边距,否则用指定值覆盖当前单元格的下边距。

返回值

此方法不返回任何数据。

示例

设置演示文稿中表格单元格文本与底部边缘之间的间距。

// How do I add space below text in a table cell in a presentation?

// Adjust the bottom margin to control padding in a table cell in a presentation.

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 content = cell.GetContent();
const paragraph = Api.CreateParagraph();
paragraph.AddText("This is just a sample text.");
content.Push(paragraph);
cell.SetCellMarginBottom(600);

slide.RemoveAllObjects();
slide.AddObject(table);