Python Forum
[Tkinter] Adding space between Notebook tabs - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: GUI (https://python-forum.io/forum-10.html)
+--- Thread: [Tkinter] Adding space between Notebook tabs (/thread-19659.html)



Adding space between Notebook tabs - Columbo - Jul-09-2019

Is there any way to add space between the tabs that are added to Tkinter Notebook?

Thanks


RE: Adding space between Notebook tabs - Larz60+ - Jul-09-2019

Please elaborate on what you mean by space.
Do you mean empty tabs?


RE: Adding space between Notebook tabs - Columbo - Jul-09-2019

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.

[Image: tabs.jpg]

Thanks


RE: Adding space between Notebook tabs - woooee - Jul-09-2019

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.


RE: Adding space between Notebook tabs - Columbo - Jul-10-2019

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)