所以我的教授让我们利用Graphis.py(zelle)为了制作一个GUI,我把所有的按钮都设计成了我的问题,那就是这个模块没有任何功能,只允许图像作为背景颜色。你们知道我怎么修改它,这样我就能把背景设置成图像吗?我认为挫折的方法是需要修改的class GraphWin(tk.Canvas):
"""A GraphWin is a toplevel window for displaying graphics."""
def __init__(self, title="Graphics Window",
width=200, height=200, autoflush=True):
master = tk.Toplevel(_root)
master.protocol("WM_DELETE_WINDOW", self.close)
tk.Canvas.__init__(self, master, width=width, height=height)
self.master.title(title)
self.pack()
master.resizable(0,0)
self.foreground = "black"
self.items = []
self.mouseX = None
self.mouseY = None
self.bind("", self._onClick)
self.bind_all("", self._onKey)
self.height = height
self.width &#