Re: Adding options to a combo box



Diego Zuccato wrote:
> Is it possible to add options (possibly sorting them) to a combo box
> without having to regenerate the whole list ?
Still no luck. Here some code I used...

void addcombo(GtkCombo *combo, const char *newstr) {
 GList *list=GTK_LIST(combo->list)->children;

 list=g_list_append(list, newstr);

 GTK_LIST(combo->list)->children=list;
}

But it doesen't work (popdown list isn't updated.

I tried creating a temp CList with just the element to add and then
'gtk_list_append'ing to combo->list .

Have I really to keep a (duplicated) list with all the items ?

Tks,
 Diego.

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]