Re: how to clear out a ComboBoxEntry
- From: Iago Rubio <iago iagorubio com>
- To: gtk-dev <gtk-app-devel-list gnome org>
- Subject: Re: how to clear out a ComboBoxEntry
- Date: Fri, 18 Aug 2006 11:03:39 +0200
On Thu, 2006-08-17 at 12:22 -0400, shawn bright wrote:
Hey there,
i am using pygtk to build an app.
i am using a gtk ComboBoxEntry with the convienence methods
like insert_text() , remove_text()
Does anyone know how to completely empty one out ?
ie, remove all entries at once ?
If you're using those calls, your combo box uses a list store as tree
model so the function below will suffice.
void remove_all (GtkComboBox *combo_box)
{
GtkTreeModel* model;
model = gtk_combo_box_get_model (combo_box);
gtk_list_store_clear (GTK_LIST_STORE(model));
}
Hope this helps.
--
Iago Rubio
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]