[Tutor] Drop-down list [was: Re: Tutor Digest, Vol 130, Issue 47]

Alan Gauld alan.gauld at btinternet.com
Thu Jan 1 23:05:07 CET 2015


On 01/01/15 17:31, Tammy Miller wrote:
> This is regarding the Python drop-down list response.

Thanks, but please do not send the entire digest contents.
Delete what is not relevant, then you wouldn't need to tell
us, and those who pay by the byte would not have such big bills.
Also change the subject to what is relevant.

> I would like to create a GUI that has a drop down list
 > containing the data and displayed based on the stats
 > of the list contents.

> I am interested in using Tkinter, wxPython or PyGTK.

OK, Since Tkinter is included with python I'll look at that.
Actually I recommend looking at Tix which also has a Combo
box object, which if you have a lot of data to enter
manually might be more useful.

There are several Tkinter tutorials on the web,
mine is here:

http://www.alan-g.me.uk/tutor/tutgui.htm

Assuming you read and understand that (if not respond
here with more questions) then the next thing to do
is look at the documentation for the Listbox object,
here:

http://effbot.org/tkinterbook/listbox.htm

and a more technical but complete specification here:

http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/listbox.html

> My data is coming from a csv file.

I'll leave extracting the data from the CSV file as an
exercise. I assume you have discovered the csv module
to help with that?

HTH
-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list