Combo Box question
- From: Piotr Chmielewski <piotr chmielewski polkomtel com pl>
- To: "'gtk-app-devel-list gnome org'" <gtk-app-devel-list gnome org>
- Subject: Combo Box question
- Date: Wed, 20 Jun 2001 11:35:07 +0200
Hi,
Note: this is my first application using GTK :-). I would like create
automatically a COMBO box with numeric values assigned to it as following
example:
GList *items = NULL;
GtkWidget *combo;
gchar *buffer[20];
.
.
.
for (i=0;i<5;i++)
{
sprintf (buffer, "%d", i);
// probably something is missing here ?
items = g_list_append (items, buffer);
}
combo = gtk_combo_new ();
gtk_combo_set_popdown_string (GTK_COMBO (combo), Items);
In fact I've got blank combo box list. What is wrong ? I suppose that I
should create new object or something like (e.g. label_new) that each time
during loop. I haven't got any idea how to do that.
Any help would be appreciated.
Best regards,
Piotr
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]