0

How I can change the size of a tab in a Tix Notebook ? this is what I do:

window = Tix.Tk()

sizex = 800
sizey = 600
posx  = 500
posy  = 150
window.wm_geometry("%dx%d+%d+%d" % (sizex, sizey, posx, posy))

nb = Tix.NoteBook(window) 


nb.add("firstTab", label="My first Tab") 
nb.add("secondTab", label="My second Tab")
page1 = nb.subwidget_list["firstTab"] 
page2 = nb.subwidget_list["secondTab"]

nb.pack(fill=Tix.BOTH, expand=2, padx=5, pady=5)     

print page1.winfo_height()
print page1.winfo_width()
print page2.winfo_height()
print page2.winfo_width()
window.mainloop()

When I print page1 dimension I got two numbers who give me the size of my tab and I don't know how page2 can have the same size as page1.

myframe = Frame(page2,relief=GROOVE,width=750,height=450,bd=4)
myframe.update()
window.update()
myframe.place(x=10,y=10)

It's the size of page1 who change...

ifko366
  • 1
  • 2
  • It seems to me that both pages have the same size, which is determined by the size of the notebook. When I visit both tabs and then print the sizes again, I get the same for both. – j_4321 Nov 21 '17 at 15:35
  • From above code, I have no reason to expect `page1` has different size than `page2`. – Nae Nov 21 '17 at 16:15
  • I agree but when i add a label myframe = Frame(page2,relief=GROOVE,width=750,height=450,bd=4) myframe.update() window.update() myframe.place(x=10,y=10) It's the size of page1 who change... – ifko366 Nov 21 '17 at 16:39

0 Answers0