PyGTK, Glade, and ComboBoxEntry.append_text()

G

Greg Johnston

Hey all,

I'm a relative newbie to Python (switched over from Scheme fairly
recently) but I've been using PyGTK and Glade to create an interface,
which is a combo I'm very impressed with.

There is, however, one thing I've been wondering about. It doesn't
seem possible to modify ComboBoxEntry choice options on the fly--at
least with append_text(), etc--because they were not created with
gtk.combo_box_entry_new_text(). Basically, I'm wondering if there's
any way around this.

Thank you,
Greg Johnston
 
Y

Yann Leboulanger

Greg said:
Hey all,

I'm a relative newbie to Python (switched over from Scheme fairly
recently) but I've been using PyGTK and Glade to create an interface,
which is a combo I'm very impressed with.

There is, however, one thing I've been wondering about. It doesn't
seem possible to modify ComboBoxEntry choice options on the fly--at
least with append_text(), etc--because they were not created with
gtk.combo_box_entry_new_text(). Basically, I'm wondering if there's
any way around this.

Thank you,
Greg Johnston

PyGTK mailing list:
http://pygtk.org/feedback.html
 
G

Greg Johnston

Hey all,

I'm a relative newbie to Python (switched over from Scheme fairly
recently) but I've been usingPyGTKand Glade to create an interface,
which is a combo I'm very impressed with.

There is, however, one thing I've been wondering about. It doesn't
seem possible to modifyComboBoxEntrychoice options on the fly--at
least with append_text(), etc--because they were not created with
gtk.combo_box_entry_new_text(). Basically, I'm wondering if there's
any way around this.

Thank you,
Greg Johnston

P.S. If anyone reads this later wondering how to do it, all you need
to do is "prime" the ComboBoxEntry with a blank entry in Glade. You
can then use append_text(), insert_text(), etc. on the object, as well
as remove_text(0) to get rid of your blank 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
473,743
Messages
2,569,477
Members
44,898
Latest member
BlairH7607

Latest Threads

Top