[英]how to "center text in a row" tkinter treeview
tv1["column"] = list(pivot.columns)
tv1["show"] = "headings"
for column in tv1["columns"]:
tv1.column(column, anchor=CENTER) # This will center text in rows
tv1.heading(column, text=column)
pivot_rows = pivot.to_numpy().tolist()
for row in pivot_rows:
tv1.insert("","end", values=row)
在文檔中找到
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.