0

好的,所以我知道我可以做到:

curPos = self.LogWindow.GetInsertionPoint
lineNum = self.LogWindow.GetRange( 0, self.LogWindow.GetInsertionPoint() ).split("\n")
lineText = self.LogWindow.GetLineText(lineNum)

但是如何将 设置InsertionPoint为当前 lint 的末尾?

Current line 当然意思是:InserionPoint当前所在的行。

任何帮助表示赞赏:)。

4

1 回答 1

1

尝试:

    curPos = self.log.GetInsertionPoint()
    curCol,curRow = self.log.PositionToXY(curPos)
    lineNum = curRow
    lineText = self.log.GetLineText(lineNum)
    newPos=self.log.XYToPosition(len(lineText), curRow)
    self.log.SetInsertionPoint(newPos)
于 2017-12-24T14:36:52.483 回答