pack grid place 放置位置
作者:互联网
import tkinter as tk window = tk.Tk() window.title("daxiangcai's title") window.geometry('800x400')
# 注意以下几种不能同时使用 tk.Label(window, text='side').pack(side='top') # top/bottom/left/right tk.Label(window, text='place').place(x=10, y=100, anchor='nw') # 将图片的左上角放在(10,100)处;中间的参数为center for i in range(4): for j in range(3): tk.Label(window, text='grid').grid(row=i, column=j, padx=10, pady=10) window.mainloop()
标签:10,text,Label,window,grid,tk,place,pack 来源: https://www.cnblogs.com/daxiangcai/p/16449031.html