def _load_browse_data(self):
print("reloading room/zones browse data")
self.data = self._get_room_list()
self.tree.delete(*self.tree.get_children())
self.tree_index = dict()
for idx in range(len(self.dataCols)):
self.tree.column(self.dataCols[idx], width=10)
for item in self.data:
index = self.tree.insert('', 'end', values=item[1:])
self.tree_index[index] = item
if item[2] == 'active':
self.tree.selection_add(index)
for idx in range(len(self.dataCols)-1):
i_width = Font().measure(item[idx+1]) + 10
if self.tree.column(self.dataCols[idx], 'width') < i_width:
self.tree.column(self.dataCols[idx], width=i_width)
评论列表
文章目录