1. 先捕获textview的button event.
2. 在button event的回调函数里面,可以将鼠标点击位置转换成textview的iter.
- x, y = self.textView.get_pointer()
-
x, y = self.textView.window_to_buffer_coords(gtk.TEXT_WINDOW_WIDGET, x, y)
-
if self.textView.get_iter_at_location(x, y).has_tag(self.errTag):
-
# Code here
阅读(1282) | 评论(0) | 转发(0) |