Trapping Frame Entrance In Tkinter
I'd like to bind to entrance/exit to/from a Frame. That's pretty easy, but it seems that when I mouse over some widget that is in the Frame, that's trapped as an exit from the Fram
Solution 1:
The actual problem here is rather subtle: in TextArea
's __init__
, you failed to pass on the master
parameter to the superclass, so it defaulted to being a child of the root window. In other words, the TextArea is actually a sibling of the MainWindow, rather than a descendant as you intended. It is thus necessary that there be a <Leave>
from one in order to <Enter>
the other. The solution is to do super().__init__(master)
, just like you did in MainWindow
.
Post a Comment for "Trapping Frame Entrance In Tkinter"