Is it possible to change width of notebooks tabs in tkinter without just entering space
in the name of the tab? I have tried to put width but I didnt succeed.
Is there any option like tabwidht
or something like that, so that I can have fixed size of tab?
import tkinter as tk
from tkinter import ttk
root = tk.Tk()
style = ttk.Style(root)
style.configure('lefttab.TNotebook', tabposition='wn',width=80)
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 longer")
notebook.grid(row=0, column=0, sticky="nw")
root.mainloop()