Python Tkinter side notebook tabs
It is possible to change the position of the tabs by configuring the tabposition
option of the TNotebook
style.
import tkinter as tkfrom tkinter import ttkroot = tk.Tk()style = ttk.Style(root)style.configure('lefttab.TNotebook', tabposition='ws')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.pack()root.mainloop()
This is how it looks like with the default theme on linux:
However, the text inside the tabs is always horizontal. I don't have Windows, so I don't know exactly how the W10 UI looks like, but I guess that you would like to rotate the tabs, not just change there position and I don't know how to do that.