mail-archives/gtk-sharp-list/2004-December/005248.html

124 строки
5.5 KiB
HTML
Исходник Обычный вид История

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