def __init__(self, parent):
Frame.__init__(self, master=parent)
self.dataCols = ('Z#', 'A', 'zone', 'room', 'info')
self.dataColSize = (40, 50, 200, 200, 200)
self.tree = ttk.Treeview(columns=self.dataCols, show='headings')
self.tree.bind("<Double-1>", self.on_click)
self.tree.grid(in_=self, row=0, column=0, sticky=NSEW)
# set frame resize priorities
self.rowconfigure(0, weight=0)
for i in range(len(self.dataCols)):
c = self.dataCols[i]
self.tree.heading(c, text=c.title(),
command=lambda c=c: self._column_sort(c, RaumfeldDesktop.SortDir))
self.tree.column(c, width=self.dataColSize[i])
self._load_browse_data()
评论列表
文章目录