Albert-Jan Roskam wrote:

> I created a small menu with Tkinter. It has two listboxes: a source and a
> destination box. The user can select files from the source box and 'move'
> them to the destination box. It now does what I want, except for one
> thing: when I resize it, the listboxes will not (*will* not, grrr)
> increase in size.
> 
> I followed these instructions:
> http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/root-resize.html
> 
> 
> I added background colors to the various frames to see what's happening. I
> pasted the code here because it is a bit much (sorry):
> http://pastebin.com/waeACc4B. Any idea what I am doing wrong in the
> function createListbox (line 80)? I am using sticky=NESW in the grid()
> calls.

You must explicitly tell the row/column to grab the extra space:

    def createListbox(self, row, column, name, contents):
        ...
        self.listboxframe.grid(row=row, column=column, sticky=self.sticky)
        self.listboxframe.columnconfigure(column, weight=1)
        self.listboxframe.rowconfigure(row, weight=1)
        ...

See http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/grid-config.html

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to