def robot(self, label,items, name):
for child in self.mainframe.winfo_children():
child.destroy()
self.add_emoji()
self.add_trace()
self.set_title(label)
ind = 0
for item in items:
col = ind%4 + 1
row = ind/4 + 1
if name=="true":
ttk.Button(self.mainframe, text=item).grid(column=col, row=row, sticky=N+S+E+W)
else:
ttk.Button(self.mainframe, text=item, image=images[item], compound="top").grid(column=col, row=row, sticky=N+S+E+W)
ind+=1
评论列表
文章目录