[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

PyGTK, Glade, and ComboBoxEntry.append_text

greg.johnston

1/21/2008 10:44:00 PM

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
2 Answers

Yann Leboulanger

1/22/2008 8:10:00 PM

0

Greg Johnston wrote:
> 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/fee...

greg.johnston

1/23/2008 3:42:00 PM

0

On Jan 21, 5:44 pm, Greg Johnston <greg.johns...@gmail.com> wrote:
> 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.