In case of label or button, I know how it's done.
style=ttk.Style()
style.configure('One.TLabel', font=('Arial', 32))
style.configure('Two.TLabel', font=('Arial', 18))
h1=Label(root, text='Heading', style='One.TLabel')
h2=Label(root, text='Sub-heading', style='Two.TLabel')
h1.pack()
h2.pack()
This works.
But in case of a notebook tab, say I wanna change tab padding and font. Same this method doesn't work.
style=ttk.Style()
style.configure('One.TNotebook.Tab', font=('Arial', 14), padding=20)
style.configure('Two.TNotebook.Tab', font=('Arial', 12), padding=10)
# adding book1 tabs
book1=Notebook(root, style='One.TNotebook')
# adding book2 tabs
book2=Notebook(root, style='Two.TNotebook')
book1.pack()
book2.pack()
How do we do it? Is there a work-around?