[Gtk-sharp-list] Gtk.ComboBox?

Viktor Stansvik vstansvik@home.se
Sat, 18 Dec 2004 17:17:32 +0100


Thanks. I have realized the situation.

-- viktor

On lör, 2004-12-18 at 09:54 -0600, Sergio Duran wrote:
> I'm not an expert on the subject but here it goes... ComboBox, is
> available with gtk# 1.9 (development version). I used pygtk
> documentation for reference, ComboBoxes are a lot like TreeViews with
> some minor differences.
> 
> This is a small example I can think of. Feel free to correct me if I
> do something wrong, anyone, I know I'm not the best :)
> 
> ComboBox combo = new ComboBox();
> // I use a name and an invisible ID
> ListStore store = new Store(typeof(string), typeof(int)); 
> CellRendererText text = new CellRendererText();
> combo.PackStart(text, false);
> combo.AddAttribute(text, "text", 0);
> 
> TreeIter iter;
> iter = store.AppendValues("-- Select", 0);
> combo.SetActiveIter(iter);
> store.AppendValues("Item 1", 1);
> store.AppendValues("Item 90", 90);
> 
> // this is how I do the loops, one could use the
> // Foreach method or I guess there's a better way
> // well, if there is, i'd be glad to know :)
> if(store.GetIterFirst(out iter)) {
>   do {
>       int id = store.GetValue(iter, 1);
>       string name = store.GetValue(iter, 0);
>       Console.WriteLine("{0}: {1}",  id, name);
>   } while(store.IterNext(ref iter))
> }
> On Sat, 18 Dec 2004 15:20:44 +0100, Viktor Stansvik <vstansvik@home.se> wrote:
> > Hmm. I just found people in the archives of this list that has used the
> > ComboBox, and when thinking about it MonoDevelop does too. However, the
> > documentation on go-mono.org says it's not implemented, and when I try
> > to compile a program that make use of it, I get unresolved symbols
> > messages.
> > 
> > Can anyone enlighten me on this?
> > 
> > -- viktor
> > 
> > On lör, 2004-12-18 at 15:11 +0100, Viktor Stansvik wrote:
> > > Hi,
> > > I was just wondering whether any work on implementing Gtk.ComboBox is
> > > being done? I would do it myself if I had the skills, but I don't think
> > > that I have. It's quite a critical widget I think.
> > >
> > > Thanks,
> > > -- viktor
> > >
> > > _______________________________________________
> > > Gtk-sharp-list maillist  -  Gtk-sharp-list@lists.ximian.com
> > > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> > >
> > 
> > _______________________________________________
> > Gtk-sharp-list maillist  -  Gtk-sharp-list@lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> >
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>