mail-archives/gtk-sharp-list/2004-August/004788.html

76 строки
2.6 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Gtk-sharp-list] Glade &amp; Viewport
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:tberman%40off.net">
<META NAME="robots" CONTENT="index,nofollow">
<LINK REL="Previous" HREF="004787.html">
<LINK REL="Next" HREF="004791.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Gtk-sharp-list] Glade &amp; Viewport
</H1>
<B>Todd Berman
</B>
<A HREF="mailto:tberman%40off.net"
TITLE="[Gtk-sharp-list] Glade &amp; Viewport">tberman@off.net
</A><BR>
<I>Sun, 29 Aug 2004 04:23:48 -0400</I>
<P><UL>
<LI> Previous message: <A HREF="004787.html">[Gtk-sharp-list] Glade &amp; Viewport
</A></li>
<LI> Next message: <A HREF="004791.html">[Gtk-sharp-list] Glade &amp; Viewport
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#4788">[ date ]</a>
<a href="thread.html#4788">[ thread ]</a>
<a href="subject.html#4788">[ subject ]</a>
<a href="author.html#4788">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>On Sun, 2004-08-29 at 10:15 +0200, Freon wrote:
&gt;<i> Something like this should work:
</I>&gt;<i>
</I>&gt;<i> [Widget] protected Widget yourWidget = null;
</I>&gt;<i> ...
</I>&gt;<i> Glade.XML gxml = new Glade.XML(&quot;gui.glade&quot;,
</I>&gt;<i> &quot;yourWidget&quot;, null);
</I>&gt;<i> gxml.Autoconnect (this);
</I>&gt;<i> this.viewPort.Add(yourWidget);
</I>&gt;<i>
</I>&gt;<i> Of course, this widget needs to be placed inside a window in Glade,
</I>&gt;<i> but you don't have to use it.
</I>
That is asking for trouble. Lots and lots of ugly trouble.
If you go and look at the MonoDevelop source, there is a class called
GladeWidget. You can write code that subclasses that widget, and it
abstracts the reparenting and adding of the widgetry. We use it inside
MonoDevelop for all of the option dialogs and such.
--Todd
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI> Previous message: <A HREF="004787.html">[Gtk-sharp-list] Glade &amp; Viewport
</A></li>
<LI> Next message: <A HREF="004791.html">[Gtk-sharp-list] Glade &amp; Viewport
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#4788">[ date ]</a>
<a href="thread.html#4788">[ thread ]</a>
<a href="subject.html#4788">[ subject ]</a>
<a href="author.html#4788">[ author ]</a>
</LI>
</UL>
</body></html>