gui_main.py 文件源码

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

项目:drc-sim 作者: rolandoislas 项目源码 文件源码
def on_tab_changed(self, event):
        """
        Close the previous tab and initialize a new one
        :param event: tab event
        :return: None
        """
        tab_id = self.notebook.select()
        tab_index = self.notebook.index(tab_id)
        tab_name = self.notebook.tab(tab_index, "text")
        LoggerGui.debug("Notebook tab changed to \"%s\" with id %d", tab_name, tab_index)
        self.tab_id = tab_id.split(".")[len(tab_id.split(".")) - 1]  # Parse notebook/tab id to only tab id
        if self.notebook.children[self.tab_id].kill_other_tabs():
            for tab in self.notebook.children:
                if tab != self.tab_id:
                    self.notebook.children[tab].deactivate()
        self.notebook.children[self.tab_id].activate()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号