зеркало из https://github.com/mono/mail-archives.git
80 строки
2.8 KiB
HTML
80 строки
2.8 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||
|
<HTML>
|
||
|
<HEAD>
|
||
|
<TITLE> [Gtk-sharp-list] Loop through all components in Window
|
||
|
</TITLE>
|
||
|
<LINK REL="Index" HREF="index.html" >
|
||
|
<LINK REL="made" HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20Loop%20through%20all%20components%20in%20Window&In-Reply-To=mailman.10272.1187745732.24950.gtk-sharp-list%40lists.ximian.com">
|
||
|
<META NAME="robots" CONTENT="index,nofollow">
|
||
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||
|
<LINK REL="Previous" HREF="008201.html">
|
||
|
<LINK REL="Next" HREF="008203.html">
|
||
|
</HEAD>
|
||
|
<BODY BGCOLOR="#ffffff">
|
||
|
<H1>[Gtk-sharp-list] Loop through all components in Window</H1>
|
||
|
<B>smso at graduate.hku.hk</B>
|
||
|
<A HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20Loop%20through%20all%20components%20in%20Window&In-Reply-To=mailman.10272.1187745732.24950.gtk-sharp-list%40lists.ximian.com"
|
||
|
TITLE="[Gtk-sharp-list] Loop through all components in Window">smso at graduate.hku.hk
|
||
|
</A><BR>
|
||
|
<I>Sat Aug 25 15:17:26 EDT 2007</I>
|
||
|
<P><UL>
|
||
|
<LI>Previous message: <A HREF="008201.html">[Gtk-sharp-list] Loop through all components in Window
|
||
|
</A></li>
|
||
|
<LI>Next message: <A HREF="008203.html">[Gtk-sharp-list] TreeModelStore: Problem with appending rows
|
||
|
</A></li>
|
||
|
<LI> <B>Messages sorted by:</B>
|
||
|
<a href="date.html#8202">[ date ]</a>
|
||
|
<a href="thread.html#8202">[ thread ]</a>
|
||
|
<a href="subject.html#8202">[ subject ]</a>
|
||
|
<a href="author.html#8202">[ author ]</a>
|
||
|
</LI>
|
||
|
</UL>
|
||
|
<HR>
|
||
|
<!--beginarticle-->
|
||
|
<PRE>You may need a recursive function which acts on Gtk.Container, e.g.
|
||
|
|
||
|
public void parse_widget_tree(Gtk.Container parent)
|
||
|
{
|
||
|
foreach (Gtk.Widget child in parent.AllChildren)
|
||
|
{
|
||
|
if (child is Gtk.Container)
|
||
|
{
|
||
|
Gtk.Container container = child as Gtk.Container;
|
||
|
parse_widget_tree(container);
|
||
|
}
|
||
|
else if (child is Gtk.Label)
|
||
|
{
|
||
|
System.Console.WriteLine(child.Name);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
[Glade.Widget] Gtk.Window window;
|
||
|
...
|
||
|
parse_widget_tree(window);
|
||
|
|
||
|
|
||
|
</PRE>
|
||
|
|
||
|
|
||
|
<!--endarticle-->
|
||
|
<HR>
|
||
|
<P><UL>
|
||
|
<!--threads-->
|
||
|
<LI>Previous message: <A HREF="008201.html">[Gtk-sharp-list] Loop through all components in Window
|
||
|
</A></li>
|
||
|
<LI>Next message: <A HREF="008203.html">[Gtk-sharp-list] TreeModelStore: Problem with appending rows
|
||
|
</A></li>
|
||
|
<LI> <B>Messages sorted by:</B>
|
||
|
<a href="date.html#8202">[ date ]</a>
|
||
|
<a href="thread.html#8202">[ thread ]</a>
|
||
|
<a href="subject.html#8202">[ subject ]</a>
|
||
|
<a href="author.html#8202">[ author ]</a>
|
||
|
</LI>
|
||
|
</UL>
|
||
|
|
||
|
<hr>
|
||
|
<a href="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">More information about the Gtk-sharp-list
|
||
|
mailing list</a><br>
|
||
|
</body></html>
|