Open adwamogus opened 1 week ago
This is my workaround for this issue:
from settings import *
import CTkMenuBar as mb # https://github.com/Akascape/CTkMenuBar
class Toolbar(): # Non Object oriented workaround
def __init__(self, app) -> None:
self.app = app
self.menu = mb.CTkMenuBar(master=self.app)
self.file_button = self.menu.add_cascade("File")
self.file_dropdown = mb.CustomDropdownMenu(widget=self.file_button)
self.file_dropdown.add_option("New")
I've encountered an issue when using the CTkMenuBar module in an object-oriented (OOP) context. The dropdown menus do not appear or function as expected when incorporated into a class-based GUI structure. This issue seems to be specific to using CTkMenuBar with OOP patterns, while in a procedural setup, the menus work correctly.
Steps to Reproduce:
Expected Behavior: Clicking on the "File" button should show the dropdown menu with options like "New."
Actual Behavior: The dropdown menu does not appear upon clicking the "File" button.
Code Example: