def __init__(self, master=Tk()):
super(MainWindow, self).__init__(master)
# Pack self to expand to root
self.grid(sticky=N + E + S + W)
# Expand main window cell inside root
top = self.winfo_toplevel()
top.rowconfigure(0, weight=1)
top.columnconfigure(0, weight=1)
top.wm_title('PyTouch Typing Tutor')
top.wm_iconname('PyTouch')
# TODO: Add icon image
# top.wm_iconphoto()
self.training_widget = TrainingWidget(self)
self.training_widget.grid(column=0, row=0, sticky=N + E + S + W)
self.columnconfigure(0, weight=1)
self.rowconfigure(0, weight=1)
self.style = ttk.Style()
if 'clam' in self.style.theme_names():
self.style.theme_use('clam')
评论列表
文章目录