相关疑难解决方法(0)

绑定到光标移动不会更改INSERT标记

每次用户通过箭头,鼠标点击等更改插入点时,我都需要执行快速检查...所以我这样绑定它:

text.bind("<Button-1>", insertchanged)

def insertchanged(event):
    pos=text.index(INSERT)
    n=text.tag_names(INSERT)
        ...
Run Code Online (Sandbox Code Playgroud)

但我发现在用户改变之前 pos仍然是位置!如何找到新职位(一般解决方案,如果可能的话:我必须将其绑定到home,end,pgup,pgdown,...)

谢谢!

python user-interface tkinter

2
推荐指数
1
解决办法
865
查看次数

标签 统计

python ×1

tkinter ×1

user-interface ×1