本文整理汇总了C#中Gtk.TreeStore.IterChildren方法的典型用法代码示例。如果您正苦于以下问题:C# TreeStore.IterChildren方法的具体用法?C# TreeStore.IterChildren怎么用?C# TreeStore.IterChildren使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.TreeStore
的用法示例。
在下文中一共展示了TreeStore.IterChildren方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HelpTree
public HelpTree () : base (GettextCatalog.GetString ("Help"), Gtk.Stock.Help)
{
tree_view = new MonoDevelop.Ide.Gui.Components.PadTreeView ();
tree_view.AppendColumn ("name_col", tree_view.TextRenderer, "text", 0);
tree_view.RowExpanded += new Gtk.RowExpandedHandler (RowExpanded);
tree_view.Selection.Changed += new EventHandler (RowActivated);
store = new TreeStore (typeof (string), typeof (Node));
tree_view.Model = store;
tree_view.HeadersVisible = false;
scroller = new MonoDevelop.Components.CompactScrolledWindow ();
scroller.ShadowType = Gtk.ShadowType.None;
scroller.Add (tree_view);
if (HelpService.HelpTree != null) {
root_iter = store.AppendValues (GettextCatalog.GetString ("Mono Documentation"), HelpService.HelpTree);
PopulateNode (root_iter);
tree_view.ExpandRow (new TreePath ("0"), false);
TreeIter child_iter;
start:
if (store.IterChildren (out child_iter, root_iter)) {
do {
if (!store.IterHasChild (child_iter)) {
store.Remove (ref child_iter);
goto start;
}
} while (store.IterNext (ref child_iter));
}
}
Control.ShowAll ();
}
示例2: HelpTree
public HelpTree()
: base(GettextCatalog.GetString ("Help"), Gtk.Stock.Help)
{
tree_view = new TreeView ();
tree_view.AppendColumn ("name_col", new CellRendererText (), "text", 0);
tree_view.RowExpanded += new Gtk.RowExpandedHandler (RowExpanded);
tree_view.Selection.Changed += new EventHandler (RowActivated);
store = new TreeStore (typeof (string), typeof (Node));
root_iter = store.AppendValues (GettextCatalog.GetString ("Mono Documentation"), Runtime.Documentation.HelpTree);
PopulateNode (root_iter);
tree_view.Model = store;
tree_view.HeadersVisible = false;
scroller = new ScrolledWindow ();
scroller.ShadowType = Gtk.ShadowType.In;
scroller.Add (tree_view);
tree_view.ExpandRow (new TreePath ("0"), false);
TreeIter child_iter;
start:
store.IterChildren (out child_iter, root_iter);
do {
if (!store.IterHasChild (child_iter)) {
store.Remove (ref child_iter);
goto start;
}
} while (store.IterNext (ref child_iter));
Control.ShowAll ();
}