tk = tkinter.Tk()
a_frame = tkinter.Frame(tk, bg='red', padx=20, pady=20)
a_label = tkinter.Label(a_frame, text='A Label')
a_button = tkinter.Button(a_frame, text='click me!')
a_frame.pack()
a_label.pack()
a_button.pack()
tk.protocol('WM_DELETE_WINDOW', tk.destroy)
retag('special', a_frame, a_label, a_button)
tk.bind_class('special', '<Button>', on_frame_click)
tk.mainloop()
How to capture events on tkinter child widgets?