I have some problems with tabs of the ttk Notebook class in python 2.7. I do not see all the tabs that I create.
I made the 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 see is

I tried changing the number of tabs, and I noticed that the size of the top tab bar changes, and if there is only one single tab, I cannot see all of them, as you can see:

What I tried did nothing:
- Tab Width Adjustment
- Moving .pack () around
- Adding .pack () to tabs
- Using ttk.Frame instead of tk.Frame
- Googling for a similar problem
What I tried worked, but not what I want:
- Do not use tabs (too many things to show)
- Only one tab available
I would be grateful for any help, thanks!
source share