I want to run function when I click on tabs.
For example, I have two tabs
def refresh():
if str(notebook.index(notebook.select())) == "2":
refresh2()
else:
refresh1()
notebook.bind("<<NotebookTabChanged>>", refresh())
Doesn't work. How can I fix it ?