[Gtk-sharp-list] ComboBoxEntry TextColumn
Paulo Pires
paulo.pires at vodafone.pt
Mon May 8 14:12:58 EDT 2006
Hi,
Where are your CellRendererXXX? I advise you to look for ComboBox examples.
<snippet>
TreeIter iter;
ListStore store = new ListStore (typeof (string));
CellRendererText cell = new CellRendererText ();
ComboBox combo = new ComboBox();
combo.PackStart (cell, false);
combo.AddAttribute (cell, "text", 0);
combo.Model = store;
iter = store.AppendValues ("BLA"); // populate combo
</snippet>
--ppires
Jorge Cabello wrote:
> Hello,
>
> Im having a problem with ComboBoxEntry Class:
> I have a ComboBoxEntry created with LibGlade. Im trying to set a Model
> and the TextColumn from which it has to get the string to show. Heres
> the code:
>
> ListStore store = new ListStore (typeof(int), typeof(string));
> store.AppendValues (1, "Test");
> Combo1.Model = store;
> Combo1.TextColumn = 1;
>
> Combo1 is declared as: [Widget] Gtk.ComboBoxEntry Combo1;
>
> When I run this code I get the following error:
> Gtk:proc 18803(critical): gtk_combo_box_entry_set_text_column: assertion
> `entry_box->priv->text_column == -1' failed
>
> Can anyone help me?
>
> I have tested to create the ComboBoxEntry without using the TextColumn
> attribute and it runs fine.
>
>
> _______________________________________________
> Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>
>
More information about the Gtk-sharp-list
mailing list