[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    Re: tkinter question
From:       Michal Bozon <bozonm () vscht ! cz>
Date:       2007-10-05 10:33:16
Message-ID: pan.2007.10.05.10.33.13.824163 () vscht ! cz
[Download RAW message or body]

On Thu, 04 Oct 2007 20:16:14 -0700, goldtech wrote:

> This works OK. But I notice that if I enlarge the window after the
> script has run, the white listbox only gets "so" big while the grey
> background enlarges.
> 
> Is there a way to have it all white when I enlarge a window - like
> what normally happens?
> 
> 
> 
> from Tkinter import *
> root = Tk()
> root.title("Dirty Words")
> scrollbar = Scrollbar(root)
> scrollbar.pack(side=RIGHT, fill=Y)
> listbox = Listbox(root, bg='white', font = "Courier 16", width=60)
> listbox.pack()
> i='123456789abcdefghijklmnopqrstuvwxyz'
> for x in range(10):
>     listbox.insert(END, i)
> listbox.config(yscrollcommand=scrollbar.set)
> scrollbar.config(command=listbox.yview)
> mainloop()

try to change listbox.pack() to listbox.pack(expand=True, fill=BOTH)
.. is it that you want ?

 -mykhal
-- 
http://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic