跳到主要内容

MoveToPrevCell

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

语法​

expression.MoveToPrevCell(count);

expression - 表示 ApiPresentation 类的变量。

参数​

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

返回值​

boolean

示例​

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

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

// Add text to the previous cell after moving the cursor back 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][1].Select();
presentation.EnterText("First selected cell");
presentation.MoveToPrevCell();
presentation.EnterText("Previous cell");