ttk.Notebook – Get active tab
We can find out which tab is open and active in a notebook widget.
1 2 3 4
# Get the selected tab index number. selected_tab_index = my_notebook.index("current") print(selected_tab_index)