Python Forum
[Tkinter] Adding space between Notebook tabs
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Adding space between Notebook tabs
#1
Is there any way to add space between the tabs that are added to Tkinter Notebook?

Thanks
Reply
#2
Please elaborate on what you mean by space.
Do you mean empty tabs?
Reply
#3
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
Reply
#4
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.
Reply
#5
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)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Found buttonstate in tabs MacTommu 4 1,948 Sep-22-2021, 05:56 PM
Last Post: deanhystad
  TabError: inconsistent use of tabs and spaces in indentation hobbyist 3 4,844 Jun-15-2021, 10:38 PM
Last Post: davide73_italy
  [Tkinter] Vertical Tabs Alignment in Tkinter muhammadasim 2 5,913 Oct-05-2020, 08:40 AM
Last Post: Larz60+
  [Tkinter] Need help please properly putting tabs within a PanedWindow JackMack118 2 3,310 Dec-08-2019, 03:02 PM
Last Post: balenaucigasa
  [PyQt] Drag items across tabs Alfalfa 5 4,689 Sep-01-2019, 11:58 PM
Last Post: Alfalfa
  [Tkinter] How to get a tabs works exactly same as google chrome sarthak260 0 3,737 Mar-07-2019, 10:45 AM
Last Post: sarthak260
  [Tkinter] Adding New TAB to NoteBook Widget by Clicking Vicolas 0 2,583 Feb-15-2019, 06:03 PM
Last Post: Vicolas
  [Tkinter] How to create multilple tabs in tkinter from different classes Rishav 5 18,182 Jul-11-2018, 11:59 AM
Last Post: CCChris91
  How to create mutiple tabs in tkinter using oops Rishav 2 6,824 Jul-12-2017, 04:43 PM
Last Post: Rishav

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020