好的,所以我知道我能做到:
curPos = self.LogWindow.GetInsertionPoint
lineNum = self.LogWindow.GetRange( 0, self.LogWindow.GetInsertionPoint() ).split("\n")
lineText = self.LogWindow.GetLineText(lineNum)
但是如何将InsertionPoint
设置为当前lint的结尾?
当前行当然意义:InserionPoint
当前所在的行。
任何帮助表示赞赏:)。
答案 0 :(得分: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)