ttk.Notebook – Hide a tab

We can hide a tab in the notebook widget by using the .tab() method.

img

1
2
# Hide the currently selected tab
my_notebook.tab("current", state="hidden")

We can also specify the index number of the tab.

1
2
# Hide the tab at index zero
my_notebook.tab(tab_id=0, state="hidden")