当前位置: 动力学知识库 > 问答 > 编程问答 >

python - What's the best way to move a gtk.TextBuffer cursor?

问题描述:

I'm trying to add some personalised shortcuts to Pyroom, this is my function for moving the cursor one character forward:

def forward_one_char(self):

buf = self.buffers[self.current]

iter1 = buf.get_iter_at_mark(buf.get_mark('insert'))

iter1.forward_char()

buf.place_cursor(iter1)

this seems crazy complicated, is there a better way?

分享给朋友:
您可能感兴趣的文章:
随机阅读: