How To Detect Hovering Over An Option In OptionMenu Using Customtkinter

64 views Asked by At

I am using customtkinter for python.

My goal is that every time the user hovers over an option from an OptionMenu widget that a little text window will pop explaining the option in more detail and that the same window will close when the user is done hovering that specific option.

I've tried something like this:

 def on_hover(event):
    ...

 menu = tk.CTkOptionMenu(root)
 menu.bind("<Enter>", lambda: on_hover)

but i'm not really sure how to continue from here.

i've also read about

menu.bind("<<MenuSelect>>",...)

but I don't really understand how it works.

Note that this question might be a bit different if a simular one was posted before because customtkinter is a bit different than tkinter.

Edit: I'm also open to using ComboBox if it has a nicer solution

0

There are 0 answers