Python Tkinter: Have Entry Receive Keys While Menu Is Posted?
I want to have an Entry with a dropdown Menu autocomplete... kind of like Chrome's omnibar, for example. One issue I'm having is that once the menu gets posted (displayed), it seem
Solution 1:
You are correct: the native menus steal all of the events, and there's nothing you can do about it. This is the price we pay for having native menus on OSX and Windows.
The workaround is to not use a menu for the dropdown. Instead, you can create an instance of Toplevel
, turn on the overrideredirect
flag, and then manage all of the events yourself. It's a bit of a chore, but it's doable.
Post a Comment for "Python Tkinter: Have Entry Receive Keys While Menu Is Posted?"