tkui.py 文件源码

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

项目:pyfeld 作者: scjurgen 项目源码 文件源码
def _load_browse_data(self):
        self.data = self._get_current_browse_list()
        self.pathLabel['text'] = "> " + self.dir_browser.get_friendly_path_name(" + ")
        self.tree.delete(*self.tree.get_children())
        # add data to the tree
        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
            for idx in range(len(self.dataCols)):
                iwidth = Font().measure(item[idx + 1]) + 10
                if self.tree.column(self.dataCols[idx], 'width') < iwidth:
                    self.tree.column(self.dataCols[idx], width=iwidth)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号