-
-
Notifications
You must be signed in to change notification settings - Fork 475
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix tkinter focus issues on Windows (#535).
- Loading branch information
Showing
1 changed file
with
6 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b7f25aa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fix the
tkinter
example above I've successfully used an idiom that does not involve the direct use ofFocusHandler
callbacks.I'll show a code sample here so that you can see if it better fits in the context of this issue
Other types of event may be handled the same way. For instance
<Button-2>
for scroll or<Button-3>
for context menus.I' didn't tested code like the one above on all platforms, but if the portability of
tkinter
holds (as I strongly believe), the code will work seamlessly on alltkinter
supported platforms.b7f25aa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whichever solution works, is fine. If you think your works better feel free to send PR. But it needs to be tested on all platforms.
b7f25aa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for your answer and for your outstanding work. When I'll have all set I'll test the solution on all supported platforms and in case I'll send the PR.