Re: Remove all text elements from GtkComboBox
- From: Sven Neumann <sven gimp org>
- To: Egon Andersen <post talura dk>
- Cc: gtk-list <gtk-list gnome org>
- Subject: Re: Remove all text elements from GtkComboBox
- Date: Fri, 19 Nov 2004 17:11:15 +0100
Hi,
Egon Andersen <post talura dk> writes:
> I've started migrating from GtkCombo to GtkComboBox.
> My old GtkCombo contains only text, so I use gtk_combo_box_new_text()
>
> At some point I have to 're-build' the text in the combobox which is
> done by first removing all existing text 'entries' and insert all the
> new text 'entries'.
> I haven't stored information about how many text elements I have appended.
> I've planed to use gtk_combo_box_remove_text(), but I can't see how I
> can know when I have removed all text 'entries'.
I haven't tried myself, but the following call should do the trick:
gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (combo)));
Sven
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]