Combobox problem



Hello
I am french and my english is bad !

So i want to build a combobox under Gtk-- and C++

So i do this :

  GtkWidget *Combo;
  GList *list = NULL;
  gint i;

  for(i=0; i<10; i++)
    list = g_list_append(list, g_strdup_printf("chaine %d", i));

  Combo = gtk_combo_new();
  gtk_combo_set_popdown_strings( GTK_COMBO(Combo), list) ;
  gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(Combo)->entry), "coucou");

it s work i suppose ;-)

After i have a table define :

 Gtk::Table windows;

and windows(7,7,true)

but my problem is attach the combo with the table !!

windows.attach(GTK_COMBO(Combo),0,5,1,2); don't work !

i have this error

g++ project.cc -o project `gtkmm-config --cflags --libs`
project.cc: In method `Principale::Principale ()':
project.cc:112: no matching function for call to `Gtk::Table::attach
(GtkCombo *, int, int, int, int)'
/usr/include/gtk--/table.h:190: candidates are: void Gtk::Table::attach
(Gtk::Widget &, unsigned int, unsigned int, unsigned int, unsigned int,
int = 5, int = 5, unsigned int = 0, unsigned int = 0)


everybody can help me!

Thanks




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