Using pygtk and glade2

J

j_mckitrick

I am having a problem with combo boxes. If I am using an XML glade2
file for my gui definition, what is the command I need to use to
access a given combo box and determine the currently selected item?

jonathon
 
P

P

j_mckitrick said:
I am having a problem with combo boxes. If I am using an XML glade2
file for my gui definition, what is the command I need to use to
access a given combo box and determine the currently selected item?

jonathon

That's easy: text = combo.entry.get_text()
More info here:
http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq14.008.htp
Getting the selected item in an option menu is much more difficult:
http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq16.004.htp

Examples are always good:
http://www.pixelbeat.org/talks/pygtk/

Pádraig.
 
J

j_mckitrick

That's easy: text = combo.entry.get_text()

But when I use

self.wTree.get_widget('Combo').entry.get_text()

it tells me

gtk.Bin does not have attribute 'entry'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,199
Messages
2,571,045
Members
47,643
Latest member
ashutoshjha_1101

Latest Threads

Top