Version: 2017.2

InputField.caretPosition

切换到手册
public int caretPosition ;

描述

当前 InputField 光标位置(以及选择尾部)。

将开始输入新文本的位置。如果已经选择了文本,这将指选择结束的位置。