tkui.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:pyfeld 作者: scjurgen 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号