(6)python tkinter-容器、子窗体
Frame
f = tkinter.Frame(width=380, height=270, bg='white').pack()
LabelFrame
f = tkinter.LabelFrame(width=180, height=130,text='第一组').pack()
Toplevel
import tkinter import tkinter.messagebox def but(): tkinter.Toplevel() root=tkinter.Tk() root.title('GUI')#标题 root.geometry('800x600')#窗体大小 root.resizable(False, False)#固定窗体 f = tkinter.Button(root,text='子窗体',command=but).pack() root.mainloop()