I don't have ads on this website.
Donations help keep this site going.

If you find tkinter-snippets.com useful, please donate any amount you feel comfortable with.
Visit https://ko-fi.com/jobinpy to donate. Thank you!

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")