def createWidgets(self):
tabControl = ttk.Notebook(self.win)
tab1 = ttk.Frame(tabControl)
tabControl.add(tab1, text='Tab 1')
tabControl.pack(expand=1, fill="both")
self.monty = ttk.LabelFrame(tab1, text=' Monty Python ')
self.monty.grid(column=0, row=0, padx=8, pady=4)
scr = scrolledtext.ScrolledText(self.monty, width=30, height=3, wrap=tk.WORD)
scr.grid(column=0, row=3, sticky='WE', columnspan=3)
menuBar = Menu(tab1)
self.win.config(menu=menuBar)
fileMenu = Menu(menuBar, tearoff=0)
menuBar.add_cascade(label="File", menu=fileMenu)
helpMenu = Menu(menuBar, tearoff=0)
menuBar.add_cascade(label="Help", menu=helpMenu)
self.createButtons()
GUI_DesignPattern.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录