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 – Disable a tab

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

We can also specify the index number of the tab.

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