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()
时间: 2024-11-05 12:30:38