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))
评论列表
文章目录