gui.py 文件源码

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

项目:modis 作者: Infraxion 项目源码 文件源码
def add_module(self, module_name, module_ui):
        """
        Adds a module to the list

        Args:
            module_name (str): The name of the module
            module_ui: The function to call to create the module's UI
        """
        m_button = tk.Label(self.module_selection, text=module_name, bg="white", anchor="w")
        m_button.grid(column=0, row=len(self.module_selection.winfo_children()), padx=0, pady=0, sticky="W E N S")

        self.module_buttons[module_name] = m_button
        m_button.bind("<Button-1>", lambda e: self.module_selected(module_name, module_ui))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号