#pack布局.py
import tkinter
root=tkinter.Tk()
root.geometry ('300x200+300+300')
root.title('pack布局')
root.config (bg='#ccff00')
label=tkinter.Label(root,text='hello, python')
label.pack()
button1=tkinter.Button(root,text='BUTTON1')
button1.pack(side=tkinter.LEFT)
button2=tkinter.Button(root,text='BUTTON2')
button2.pack(side=tkinter.RIGHT)
root.mainloop()
pack布局
最新推荐文章于 2024-05-16 02:16:41 发布