[Vala] ComboBoxEntry+GtkBuilder



Hello, I'm trying to get the text in a ComboBoxEntry created with glade
(GtkBuilder format)
In the glade file I add a ListStore (with a gchararray column) to the
ComboBoxEntry .


*****************Code*********************************************
var url_repo  = builder.get_object  ("url_repo") as ComboBoxEntry;
  url_repo.append_text("lolo");
  
  string url  = url_repo.get_active_text();
stdout.printf("%s\n",url);

*****************Code*********************************************

All work fine except that don't print the text.

Thanks

pd: Sorry by my bad English.
 




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