void RestoreStatus(ArrayList list) { foreach (string namePath in list) { string[] names = namePath.Split('/'); Gtk.TreeIter iter = Gtk.TreeIter.Zero; bool found = true; foreach (string name in names) { if (name == "") { continue; } if (!FindChildByName(name, ref iter)) { found = false; break; } } if (found) { tree.ExpandRow(store.GetPath(iter), false); } } }
public void RefreshItem(ITreeItem item) { var path = model.GetPathFromItem(item); if (path != null && path.Depth > 0 && !object.ReferenceEquals(item, collection.Collection)) { Gtk.TreeIter iter; tree.Model.GetIter(out iter, path); tree.Model.EmitRowChanged(path, iter); tree.Model.EmitRowHasChildToggled(path, iter); cancelExpandCollapseEvents = true; if (item.Expanded) { tree.CollapseRow(path); tree.ExpandRow(path, false); collection.ExpandItems(item, path); } else { tree.CollapseRow(path); } cancelExpandCollapseEvents = false; } else { RefreshData(); } }
/// <summary> /// Incrementally expands the given TreePath /// because the lazy loaded rows do not support regular expanding. /// </summary> /// <param name="path">Path.</param> /// private void expandPath(string path) { Gtk.TreePath treePath = new Gtk.TreePath(path); assemblyTree.ActivateRow(treePath, assemblyTree.GetColumn(0)); assemblyTree.ExpandRow(treePath, true); }