Python Forum

Full Version: Adding space between Notebook tabs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there any way to add space between the tabs that are added to Tkinter Notebook?

Thanks
Please elaborate on what you mean by space.
Do you mean empty tabs?
When I add tabs to Notebook they are laid out end to end with no separation between the tabs. What I want to do is have a small space between each tab so that you can clearly see each individual tab. An example below.

─░mage


Thanks
The geometry manager may be able to insert am empty column between the two, at whatever width you want. But no one can tell what you are doing without code.
Here is my code for the Notebook and tabs.


tab_control = ttk.Notebook(root)
tab1 = ttk.Frame(tab_control)
tab2 = ttk.Frame(tab_control)
tab_control.add(tab1, text='Dinosaur Picture')
tab_control.add(tab2, text='Size Comparison')
lbl1_image=PhotoImage(file='Anatotitan.gif')
lbl1=Label(tab1, image=lbl1_image, bd=1)
lbl1.grid(column=0, row=0)
lbl2_image=PhotoImage(file='Anatotitan_size.gif')
lbl2=Label(tab2, image=lbl2_image, bd=1)
lbl1.grid(column=0, row=0)
lbl2.grid(column=0, row=0)
tab_control.place(x=890 , y=220)