[Monodevelop-patches-list] r410 - src/Libraries/MonoDevelop.Gui/System.Windows.Forms

commit-watcher at sevenl.net commit-watcher at sevenl.net
Thu Jan 8 16:08:03 EST 2004


Author: pedro
Date: 2004-01-08 16:08:03 -0500 (Thu, 08 Jan 2004)
New Revision: 410

Modified:
   src/Libraries/MonoDevelop.Gui/System.Windows.Forms/TreeNode.cs
Log:
Expand support for tree


Modified: src/Libraries/MonoDevelop.Gui/System.Windows.Forms/TreeNode.cs
===================================================================
--- src/Libraries/MonoDevelop.Gui/System.Windows.Forms/TreeNode.cs	2004-01-08 20:45:12 UTC (rev 409)
+++ src/Libraries/MonoDevelop.Gui/System.Windows.Forms/TreeNode.cs	2004-01-08 21:08:03 UTC (rev 410)
@@ -9,7 +9,6 @@
 		private string text;
 		private Gdk.Pixbuf image;
 		private object tag;
-		private bool isExpanded; // TODO
 		
 		public TreeNode() {
 			nodes = new TreeNodeCollection();
@@ -54,12 +53,19 @@
 		
 		public bool IsExpanded {
 			get {
-				return isExpanded;
+				if (TreeView != null) {
+					return TreeView.RowExpand(new Gtk.TreePath(TreePath));
+				} else {
+					return false;
+				}
 			}
 			set {
-				isExpanded = value;
+				if (TreeView != null) {
+					TreeView.ExpandRow(new Gtk.TreePath(TreePath), value);
+				}
 			}
 		}
+		
 		public TreeNodeCollection Nodes {
 			get {
 				return nodes;
@@ -91,6 +97,9 @@
 		}
 		
 		public void Expand() {
+			if (TreeView != null) {
+				TreeView.ExpandToPath(new Gtk.TreePath(TreePath));
+			}
 			//throw new NotImplementedException("Expand");
 		}
 		




More information about the Monodevelop-patches-list mailing list