I have a problem with bind_class. I want to bind some events for all buttons in my topLevel mainWindow. But my other topLevel themeWindow's buttons also effected from this.
My code:
root = tk.Tk()
mainWindow = Toplevel(root)
themeWindow = Toplevel(root)
#my buttons and labels
mainWindow.bind_class('Button', '<Enter>', onCursorButton, add='+')
mainloop()
And themeWindow's buttons keep effecting from <Enter> and <Leave> event.