def multi_column_listbox(self, column_names):
tree = ttk.Treeview(columns=column_names, show='headings')
for col in tree['columns']:
tree.column(col, width=300)
if col == 'Encryption' or col == 'Authentication':
tree.column(col, width=100)
tree.heading(col, text=col, anchor='center',
command=lambda x=col: self.sort_column(tree, x, False))
return tree
评论列表
文章目录