tkInter Listbox question

rantingrick rantingrick at gmail.com
Mon Jun 21 12:36:26 EDT 2010


On Jun 21, 12:36 am, Anthony Papillion <papill... at gmail.com> wrote:
> 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.


eb303 answered your question perfectly however he failed to point you
toward the proper documentation. The Python docs you need are here...

    http://effbot.org/tkinterbook/

<FYI> Remember Guys, this is a Python mailing list. Always give
reference FIRST to docs that are "Python" specific. *Then* if you want
to show off your multi lingual-ness by all means post extra links. </
FYI>



More information about the Python-list mailing list