-1
为了安全起见,我正在为我的工作做一个小记事本。我不允许在我的软件中使用菜单,我需要复制我要在笔记中输入的内容。我想知道如何复制我选择的东西,只需点击右键。右键单击从菜单中选择的菜单
我的脚本:
from tkinter import *
filename = None
def newFile():
global filename
filename = "Untitled"
text.delete(0.0, END)
root = Tk() root.title("Comment Pad") root.minsize(width=520, height=600)
root.maxsize(width=520, height=600)
text = Text(root, width=400, height=400) text.pack()
root.mainloop()
出了毛病,你的代码格式。请再试一次。 – Kevin
FWIW,'0.0'是一个无效索引。第一个字符是'1.0'。 “0.0”只是作为它如何实现的副作用。 –