我需要在Python中创建Control-Z和Shift-Control-Z函数。有谁知道吗?
我还需要选择整个文本小工具的内容,有人知道怎么做吗?
发布于 2010-06-29 09:45:55
有关撤消机制,请结合EditorWindow.py检查Idle的UndoDelegator.py。
要选择文本小工具的全部内容,您可以执行以下操作:
# remove previous selection, if any
text_widget.tag_remove(Tkinter.SEL, "1.0", Tkinter.END)
# select all
text_widget.tag_add(Tkinter.SEL, "1.0", Tkinter.END)
# place cursor
text_widget.mark_set(Tkinter.INSERT, Tkinter.END)https://stackoverflow.com/questions/3135924
复制相似问题