I have some trouble with the tabs from the ttk Notebook class in python 2.7. I cannot see all the tabs I create.
I made a minimal code to view the problem:
from Tkinter import *
import ttk
root = Tk()
nb = ttk.Notebook(root, width=320, height=240)
nb.pack(fill=BOTH, expand=1)
page0 = Frame(nb)
page1 = Frame(nb)
page2 = Frame(nb)
page3 = Frame(nb)
page4 = Frame(nb)
nb.add(page0, text="0")
nb.add(page1, text="1")
nb.add(page2, text="2")
nb.add(page3, text="3")
nb.add(page4, text="4")
root.mainloop()
All I can see is
I tried to change the number of tabs and I noticed the size of the top tab bar changes and unless there's only one single lonely tab, I cannot see all of them, as you can see:
What I tried that didn't do anything:
- Setting tabs width
- Moving the .pack() around
- Adding .pack() to the tabs
- Using ttk.Frame instead of tk.Frame
- Googling for a similar problem
What I tried that worked but isn't what I want:
- Not using tabs (too many stuff to show)
- Having only one tab
I'll appreciate any help, thanks!