import tkinter as tk window = tk.Tk() window.title("daxiangcai's title") window.geometry('800x400') tk.Label(window, text='on the window').pack() # window上的label frm = tk.Frame(window) # 主frame frm.pack() frmleft = tk.Frame(frm) # 次frame frmright = tk.Frame(frm) frmleft.pack(side='left') frmright.pack(side='right') tk.Label(frmleft, text='left frame').pack() # frame上的label tk.Label(frmright, text='right frame').pack() window.mainloop()
原创文章,作者:6024010,如若转载,请注明出处:https://blog.ytso.com/271669.html