I'm trying to add frames in a master frame with the grid manager, and it seems that the option 'sticky' doesn't work as it should When I change the size of the master frame, the subframes don't want to be resized like expand =1 , fill = 'both' for pack layout manager Thanks for help
import Tkinter as tk root = tk.Tk() frames= [] rw = 0 col=0 fr = tk.Frame(root,borderwidth =1,relief = 'groove');frames+=[fr] fr.grid(row=rw,column=col,sticky='nswe') tk.Button(fr,text='button (%d,%d)'%(rw,col)).pack(padx=10,pady=10) col+=1 fr = tk.Frame(root,borderwidth =1,relief = 'groove');frames+=[fr] fr.grid(row=rw,column=col,sticky='wens') tk.Button(fr,text='button (%d,%d)'%(rw,col)).pack(padx=10,pady=10) rw+=1 col=0 fr = tk.Frame(root,borderwidth =1,relief = 'groove');frames+=[fr] fr.grid(row=rw,column=col,sticky='wens') tk.Button(fr,text='button (%d,%d)'%(rw,col)).pack(padx=10,pady=10) col+=1 fr = tk.Frame(root,borderwidth =1,relief = 'groove');frames+=[fr] fr.grid(row=rw,column=col,sticky='wens') tk.Button(fr,text='button (%d,%d)'%(rw,col)).pack(padx=10,pady=10) col+=1 rw+=1 col=0 fr = tk.Frame(root,borderwidth =1,relief = 'groove');frames+=[fr] fr.grid(row=rw,column=col,sticky='wens') tk.Button(fr,text='button (%d,%d)'%(rw,col)).pack(padx=10,pady=10) col+=1 fr = tk.Frame(root,borderwidth =1,relief = 'groove');frames+=[fr] fr.grid(row=rw,column=col,sticky='wens') tk.Button(fr,text='button (%d,%d)'%(rw,col)).pack(padx=10,pady=10) col+=1 root.mainloop() Olivier _______________________________________________ Tkinter-discuss mailing list [email protected] http://mail.python.org/mailman/listinfo/tkinter-discuss
