Re: Adding options to a combo box HALF SOLVED !



Diego Zuccato wrote:
> Is it possible to add options (possibly sorting them) to a combo box
> without having to regenerate the whole list ?
Seems I like chatting with myself :-)

I just forgot to create a new GtkListItem...
So the function I'm now using is like :

void combo_list_append(GtkCombo combo, const char* string)
{
 GtkWidget *li=gtk_list_item_new_with_label(string);
 gtk_container_add(GTK_CONTAINER(combo->list), li);
 gtk_widget_show(li);
}

In the subject I say it's only HALF SOLVED because I can only add to the
end of the popup list. GtkContainer AFAIK have no method to insert an
element in a given position :-(

BYtE,
 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]