Gtk Combo box question
- From: Piotr Chmielewski <pchmielewski poland com>
- To: gtk-app-devel-list gnome org
- Subject: Gtk Combo box question
- Date: Wed, 20 Jun 2001 21:36:35 +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
API SH/CD, 195/65R15 88H, HC/R 25 E1 02A 44457
Dezorientujące symbole - zobacz, co oznaczają!
http://parking.poland.com/zapraszamy/porady.asp
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]