Detecting `<Enter>` and `<Leave>` events for a frame in tkinter
<p>I have a menu which when the user moves their mouse off I want to disappear. The menu consists of a <code>Frame</code> packed with several <code>Label</code>/<code>Button</code> widgets. I can detect the user moving their mouse off a <code>Label</code>/<code>Button</code> with simply binding to the <code>&lt;Enter&gt;</code>/<code>&lt;Leave</code> events for those. But binding to the same events for the frame never triggers - I guess because the widgets on top cover up the frame so the mouse never enters it?</p>

<p>Is their a way to make the events propagate down to the containing <code>Frame</code>? </p>

<pre><code>window=tkinter.Tk()
menu_frm = tkinter.Frame(window, name="menu_frm")
lbl_1 = tkinter.Label(menu_frm, text="Label", name="lbl_1")
lbl_1.pack()
lbl_2 = tkinter.Label(menu_frm, text="Label", name="lbl_2")
lbl_2.pack()
menu_frm.pack()
# These two (per label and the number of labels is likely to grow) events fire
lbl_1.bind("&lt;Enter&gt;", lambda _: stayopenfunction())
lbl_1.bind("&lt;Leave&gt;", lambda _: closefunction())
lbl_2.bind("&lt;Enter&gt;", lambda _: stayopenfunction())
lbl_2.bind("&lt;Leave&gt;", lambda _: closefunction())
# These two events do not fire
menu_frm.bind("&lt;Enter&gt;", lambda _: stayopenfunction())
menu_frm.bind("&lt;Leave&gt;", lambda _: closefunction())
</code></pre>