【发布时间】:2009-05-06 09:57:03
【问题描述】:
我想在 Gtk# 中检索我所在窗口的子窗口。到目前为止,我发现查看文档的唯一方法是通过 Window 的 Children 属性循环执行此操作,例如:
foreach (Widget w in this)
{
if (w.Name == "MyWidget")
return w;
}
this 是窗口。
我确信必须有一种更好、更简洁、更有效的方法来根据元素的某些属性直接从元素中检索特定的子小部件。
感谢您的帮助!
【问题讨论】: