Is there a way to set tabs of a Notebook below one another? Is there a way to set tabs of a Notebook below one another? tkinter tkinter

Is there a way to set tabs of a Notebook below one another?


Yes, please check this code:

import tkinter as tkfrom tkinter import ttkroot = tk.Tk()style = ttk.Style(root)style.configure('lefttab.TNotebook', tabposition='wn')notebook = ttk.Notebook(root, style='lefttab.TNotebook')f1 = tk.Frame(notebook, bg='red', width=200, height=200)f2 = tk.Frame(notebook, bg='blue', width=200, height=200)notebook.add(f1, text='Frame 1')notebook.add(f2, text='Frame 2')notebook.grid(row=0, column=0, sticky="nw")root.mainloop()


No, there is not a way to do that with the ttk notebook widget.

On a side note: multiple rows of tabs is widely regarded as being very user-UNfriendly from a usability perspective. If you need to create a UI that has that many tabs, you might want to consider a different approach if you're concerned about how easy your program is to use.


For reference - Yes

See the code in the following top right tabs

And use 'wn' to force the tabs to stack in the top left and downwards