[pygtk] how to clear a combo box entry

shawn bright nephish at gmail.com
Fri Oct 27 05:28:16 WST 2006


easy enough, thanks !
shawn

On 10/26/06, Sebastian P=F6lsterl <marduk at k-d-w.org> wrote:
>
> shawn bright schrieb:
> > lo there all,
> >
> > i am using a GtkComboBoxEntry in an app i used glade to build. Now, i
> > know how to add items to it, and i think even remove items from it, but
> > i do not know how to clear all the items out of one.
> >
> > i mean, lets say  that when i built the box in glade, i used the items
> > entry in the properties dialog to enter 4 items.
> > cheese shop, holy grail, meaning of life, and dead parrot. Now the GUI
> > loads with these items, but how do i get rid of them to replace them
> > with something else?
> >
> > thanks
> > sk
> >
> Hi there!
>
> Just call clear() on the TreeModel you associated with the ComboBoxEntry.
>
> In other words:
> my_combobox_entry.get_model().clear()
>
> --
> Greetings,
> Sebastian P=F6lsterl
> _______________________________________________
> pygtk mailing list   pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20061026/9e8c3eff/at=
tachment.htm


More information about the pygtk mailing list