[Gtk-sharp-list] Combobox with DataSource

Wolfgang Silbermayr wolfgang.silbermayr at gmail.com
Thu Aug 2 12:24:38 UTC 2012


On 2012-08-02 13:08, Amorphiell wrote:

> Options.DViewMan is the corresponding DataViewManager, coming from a
> public static class, so that should not be the problem. The error I get
> is a "Gtk.Combobox" does not contain a definition for DataSource and no
> extension method could be found etc. ... (missing using directive or
> assembly reference?) (It's in German and I don't have the exactly
> matching English translation) Any ideas on where I am missing something?
> Because from what I read the DataSource is part of System.Data, so that
> reference is there.

Are you using a Gtk.ComboBox intentionally? If yes, you won't be able to
set the DataSource property of it, because there is none. The example in
the bugtracker that you found used the ComboBox from
System.Windows.Forms [0], which has nothing to do with Gtk. With Gtk you
either can feed a string[] to the ComboBox, or you create a TreeModel
that is used. This however is beyond the scope of what I can quickly
write here. The documentation for the Gtk combobox is at [1].

Regards, Wolfgang.

--

[0]
http://msdn.microsoft.com/en-us/library/system.windows.forms.combobox.aspx
[1] http://docs.go-mono.com/?link=T%3aGtk.ComboBox



More information about the Gtk-sharp-list mailing list