tkInter Listbox question

Anthony Papillion papillion at gmail.com
Mon Jun 21 01:36:11 EDT 2010


So I'm trying to add a Listbox to my window. I want it to be the width
of my window and the height of my window.  I'm using the following
code ('root' is my toplevel window):

gsItems = Listbox(root, width=root.winfo_width(),
height=root.winfo_height())
gsItems.pack()

While you would think this code would set the height and width of
gsItems to the height and width of root, it doesn't. Instead it puts a
little tiny listbox in the middle of the form.

I've been Googling for almost an hour. Can anyone help me figure this
out? Point me in the right direction?

Thanks!
Anthony



More information about the Python-list mailing list