跳到主要内容

MoveToNextCell

将光标移动到下一个表格单元格。

语法​

expression.MoveToNextCell(count);

expression - 表示 ApiPresentation 类的变量。

参数​

名称必需/可选数据类型默认值描述
count可选number1要移动经过的单元格数。

返回值​

boolean

示例​

将光标移动到幻灯片中表格的下一个单元格。

// Navigate between adjacent table cells without selecting a cell directly.

// Add text to the next cell after moving the cursor to it on a slide.

let presentation = Api.GetPresentation();
let slide = presentation.GetSlideByIndex(0);
let table = Api.CreateTable(2, 2);
slide.AddObject(table);
table.Cells[0][0].Select();
presentation.EnterText("First cell");
presentation.MoveToNextCell();
presentation.EnterText("Second cell");