|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 hveagle 于 2024-2-5 16:22 编辑
1
你以为我在吹水吗?# 求助66CDQZZ908520240205报错
Traceback (most recent call last):
File "/Users/zhangxiang/Documents/六六湖秘密探险2.x(最新).py", line 75, in <module>
button_a_window = Canvas.create_window(w, 330, 10, window=Button)
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/tkinter/__init__.py", line 2885, in create_window
return self._create('window', args, kw)
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/tkinter/__init__.py", line 2847, in _create
return self.tk.getint(self.tk.call(
_tkinter.TclError: bad window path name "4568773312Button"
# 求助66CDQZZ908520240205代码
button_a = Button(w, text='家', command=callback)
button_a_window = Canvas.create_window(w, 330, 10, window=Button)
button_b = Button(w, text='鱼C公园', command=callback)
button_a_window = Canvas.create_window(w, 330, 20, window=Button)
button_c = Button(w, text='食物超市1~6', command=callback)
button_a_window = Canvas.create_window(w, 330, 30, window=Button)
button_d = Button(w, text='武器超市1~6', command=callback)
button_a_window = Canvas.create_window(w, 330, 40, window=Button)
button_e = Button(w, text='LV1打工仔公司', command=callback)
button_a_window = Canvas.create_window(w, 330, 50, window=Button)
# 求助66CDQZZ908520240205代码
button_a = Button(w, text='家', command=callback)
button_a_window = Canvas.create_window(w, 330, 10, window=button_a)
button_b = Button(w, text='鱼C公园', command=callback)
button_a_window = Canvas.create_window(w, 330, 20, window=button_b)
button_c = Button(w, text='食物超市1~6', command=callback)
button_a_window = Canvas.create_window(w, 330, 30, window=button_c)
button_d = Button(w, text='武器超市1~6', command=callback)
button_a_window = Canvas.create_window(w, 330, 40, window=button_d)
button_e = Button(w, text='LV1打工仔公司', command=callback)
button_a_window = Canvas.create_window(w, 330, 50, window=button_e)
......肯定是写你添加的按钮啊.试试看,对不对
|
|