def __init__(self): frameR = Frame(self.root, height=200, width=1000, bd=20, bg='white') frameL = Frame(self.root, height=200, width=1000, bd=20, bg='white') self.btShow = Button(frameL, text='show words') self.btShow.pack() self.btShow.bind('<Button-1>', self.shower) label = Label(frameL, text='chose\nthe word', font='Arial 14') label.pack() self.progr = ttk.Progressbar(frameL, orient='horizontal') self.wordList = Listbox(frameL, selectmode=SINGLE, height=30) self.wordList.bind('<Double-Button-1>', self.listReader) frameR.grid(row=1, column=2) frameL.grid(row=1, column=1) for i in range(5): for j in range(5): self.canV[i].append(None) self.canG[i].append(None) self.canD[i].append(None) self.table = search.getTable() for i in range(5): for j in range(5): self.letter[i].append(Button(frameR, text=self.table[i][j].upper(), font='Arial 36', bg='white', height=1, width=2)) self.letter[i][j].grid(row=i * 2, column=(j * 2)) if i == j == 0: self.width = self.letter[i][j].winfo_reqwidth() self.height = self.letter[i][j].winfo_reqheight() self.pointer[label.winfo_id()] = [i, j] self.canD[i][j] = Canvas(frameR, width=10, height=10) self.canD[i][j].grid(row=2 * i + 1, column=2 * j + 1) self.canV[i][j] = Canvas(frameR, width=10, height=self.height) self.canV[i][j].grid(row=2 * i, column=2 * j + 1) self.canG[i][j] = Canvas(frameR, width=self.width, height=10) self.canG[i][j].grid(row=2 * i + 1, column=2 * j)