зеркало из https://github.com/mono/mail-archives.git
124 строки
5.5 KiB
HTML
124 строки
5.5 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Gtk-sharp-list] Gtk.ComboBox?
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:vstansvik%40home.se">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
|
|
<LINK REL="Previous" HREF="005247.html">
|
|
<LINK REL="Next" HREF="005249.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Gtk-sharp-list] Gtk.ComboBox?
|
|
</H1>
|
|
<B>Viktor Stansvik
|
|
</B>
|
|
<A HREF="mailto:vstansvik%40home.se"
|
|
TITLE="[Gtk-sharp-list] Gtk.ComboBox?">vstansvik@home.se
|
|
</A><BR>
|
|
<I>Sat, 18 Dec 2004 17:17:32 +0100</I>
|
|
<P><UL>
|
|
<LI> Previous message: <A HREF="005247.html">[Gtk-sharp-list] Gtk.ComboBox?
|
|
</A></li>
|
|
<LI> Next message: <A HREF="005249.html">[Gtk-sharp-list] bundling dlls for Windows GTK# application
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#5248">[ date ]</a>
|
|
<a href="thread.html#5248">[ thread ]</a>
|
|
<a href="subject.html#5248">[ subject ]</a>
|
|
<a href="author.html#5248">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>Thanks. I have realized the situation.
|
|
|
|
-- viktor
|
|
|
|
On lör, 2004-12-18 at 09:54 -0600, Sergio Duran wrote:
|
|
><i> I'm not an expert on the subject but here it goes... ComboBox, is
|
|
</I>><i> available with gtk# 1.9 (development version). I used pygtk
|
|
</I>><i> documentation for reference, ComboBoxes are a lot like TreeViews with
|
|
</I>><i> some minor differences.
|
|
</I>><i>
|
|
</I>><i> This is a small example I can think of. Feel free to correct me if I
|
|
</I>><i> do something wrong, anyone, I know I'm not the best :)
|
|
</I>><i>
|
|
</I>><i> ComboBox combo = new ComboBox();
|
|
</I>><i> // I use a name and an invisible ID
|
|
</I>><i> ListStore store = new Store(typeof(string), typeof(int));
|
|
</I>><i> CellRendererText text = new CellRendererText();
|
|
</I>><i> combo.PackStart(text, false);
|
|
</I>><i> combo.AddAttribute(text, "text", 0);
|
|
</I>><i>
|
|
</I>><i> TreeIter iter;
|
|
</I>><i> iter = store.AppendValues("-- Select", 0);
|
|
</I>><i> combo.SetActiveIter(iter);
|
|
</I>><i> store.AppendValues("Item 1", 1);
|
|
</I>><i> store.AppendValues("Item 90", 90);
|
|
</I>><i>
|
|
</I>><i> // this is how I do the loops, one could use the
|
|
</I>><i> // Foreach method or I guess there's a better way
|
|
</I>><i> // well, if there is, i'd be glad to know :)
|
|
</I>><i> if(store.GetIterFirst(out iter)) {
|
|
</I>><i> do {
|
|
</I>><i> int id = store.GetValue(iter, 1);
|
|
</I>><i> string name = store.GetValue(iter, 0);
|
|
</I>><i> Console.WriteLine("{0}: {1}", id, name);
|
|
</I>><i> } while(store.IterNext(ref iter))
|
|
</I>><i> }
|
|
</I>><i> On Sat, 18 Dec 2004 15:20:44 +0100, Viktor Stansvik <<A HREF="mailto:vstansvik@home.se">vstansvik@home.se</A>> wrote:
|
|
</I>><i> > Hmm. I just found people in the archives of this list that has used the
|
|
</I>><i> > ComboBox, and when thinking about it MonoDevelop does too. However, the
|
|
</I>><i> > documentation on go-mono.org says it's not implemented, and when I try
|
|
</I>><i> > to compile a program that make use of it, I get unresolved symbols
|
|
</I>><i> > messages.
|
|
</I>><i> >
|
|
</I>><i> > Can anyone enlighten me on this?
|
|
</I>><i> >
|
|
</I>><i> > -- viktor
|
|
</I>><i> >
|
|
</I>><i> > On lör, 2004-12-18 at 15:11 +0100, Viktor Stansvik wrote:
|
|
</I>><i> > > Hi,
|
|
</I>><i> > > I was just wondering whether any work on implementing Gtk.ComboBox is
|
|
</I>><i> > > being done? I would do it myself if I had the skills, but I don't think
|
|
</I>><i> > > that I have. It's quite a critical widget I think.
|
|
</I>><i> > >
|
|
</I>><i> > > Thanks,
|
|
</I>><i> > > -- viktor
|
|
</I>><i> > >
|
|
</I>><i> > > _______________________________________________
|
|
</I>><i> > > Gtk-sharp-list maillist - <A HREF="mailto:Gtk-sharp-list@lists.ximian.com">Gtk-sharp-list@lists.ximian.com</A>
|
|
</I>><i> > > <A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">http://lists.ximian.com/mailman/listinfo/gtk-sharp-list</A>
|
|
</I>><i> > >
|
|
</I>><i> >
|
|
</I>><i> > _______________________________________________
|
|
</I>><i> > Gtk-sharp-list maillist - <A HREF="mailto:Gtk-sharp-list@lists.ximian.com">Gtk-sharp-list@lists.ximian.com</A>
|
|
</I>><i> > <A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">http://lists.ximian.com/mailman/listinfo/gtk-sharp-list</A>
|
|
</I>><i> >
|
|
</I>><i> _______________________________________________
|
|
</I>><i> Gtk-sharp-list maillist - <A HREF="mailto:Gtk-sharp-list@lists.ximian.com">Gtk-sharp-list@lists.ximian.com</A>
|
|
</I>><i> <A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">http://lists.ximian.com/mailman/listinfo/gtk-sharp-list</A>
|
|
</I>><i>
|
|
</I>
|
|
|
|
</PRE>
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI> Previous message: <A HREF="005247.html">[Gtk-sharp-list] Gtk.ComboBox?
|
|
</A></li>
|
|
<LI> Next message: <A HREF="005249.html">[Gtk-sharp-list] bundling dlls for Windows GTK# application
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#5248">[ date ]</a>
|
|
<a href="thread.html#5248">[ thread ]</a>
|
|
<a href="subject.html#5248">[ subject ]</a>
|
|
<a href="author.html#5248">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
</body></html>
|