[Gtk-sharp-list] Add data to ComboBox
Dan Winship
danw@novell.com
Mon, 22 Nov 2004 10:45:02 -0500
On Mon, 2004-11-22 at 06:54 -0500, Ryan wrote:
> Just a few questions on Gtk.ComboBox in gtk-sharp 1.9.0.
>
> How do you add data to it?
You need to create a TreeModel and either create the ComboBox with the
TreeModel constructor, or set its Model property after creating it. Then
you add things to the TreeModel, and they show up in the ComboBox. Note
that I'm pretty sure that using TreeModel is currently really annoying,
but Mike is working on that (but he's on vacation this week, so don't
expect any progress until next week).
> And lastly - does it support being populated by an ArrayList?
Not in the current system. Possibly eventually.
-- Dan