我在 column 上設置 "stretch = False", 讓他不能調寬度, 但是沒有作用, 有人知道為什麼嗎?
以下是我的代碼
from tkinter import * from tkinter import ttk def main(): gMaster = Tk() w = ttk.Treeview(gMaster, show="headings", columns=('Column1', 'Column2')) w.heading('#1', text='Column1', anchor=W) w.heading('#2', text='Column2', anchor=W) w.column('#1', minwidth = 70, width = 70, stretch = False) w.column('#2', minwidth = 70, width = 70, stretch = False) w.grid(row = 0, column = 0) mainloop() if __name__ == "__main__": main()