a。有一個場景,我已經創建瞭如下所示的標籤列表。 class test_template:
def __init__(self, master):
self.master = master
...
def nb_code(self):
if nb_cnt == 0:
for i in range (int(no_of_fs)):
self.e
在此程序中,我試圖在新功能開始時銷燬所有屏幕小部件,並立即在屏幕上重新創建它們以複製出現的新頁面。點擊遊戲菜單中可以正常工作的開始按鈕,我已經使用了破壞功能來「更換頁面」。 但是當試圖在畫布上的錯誤上點擊時銷燬所有頁面的第二次: _tkinter.TclError: bad window path name ".49314384" 呈現。 from tkinter import *
im
它又是我:) 我正在繼續我的遊戲項目。我被卡住了(作爲初學者): 我有一個表格(列表中有4個元素,每個元素的長度都很靈活,但這只是一個簡單的例子)。 所以這裏是我的代碼: from tkinter import*
l=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]
n=len(l) #this is the length of the list l
lng
我使用MonsterBat分身所示的代碼工作中Move and zoom a tkinter canvas with mouse 它的偉大工程!但是,當我添加一個self.canvas.bind(「<Button-2>」,self.find_nearest)時,完全忽略右鍵單擊。 這裏是修改代碼: #!/usr/bin/python2.7
"""
https://stackoverflow.c