tkinter notebook.tab: text (title) displayed incorrectly tkinter notebook.tab: text (title) displayed incorrectly tkinter tkinter

tkinter notebook.tab: text (title) displayed incorrectly


If someone else still needs a solution to this. This is hacky but works:

s = ttk.Style()s.configure('TNotebook.Tab', padding=(20, 8, 20, 0))


It will be nicer to apply the fixing answered by mrushabh only for OSX, like this:

root = tk.Tk()# a fix for running on OSX - to center the title text verticallyif root.tk.call('tk', 'windowingsystem') == 'aqua':  # only for OSX    s = ttk.Style()    # Note: the name is specially for the text in the widgets    s.configure('TNotebook.Tab', padding=(12, 8, 12, 0))