コード例 #1
0
		public void Add (TreeNode child)
		{
			child.Index = items.Add (child);
			child.Tree = tree;
			child.SetParent (parent);
			if (marked) {
				child.TrackViewState ();
				child.SetDirty ();
				dirty = true;
			}
		}
コード例 #2
0
		public void AddAt (int index, TreeNode child)
		{
			items.Insert (index, child);
			child.Index = index;
			child.Tree = tree;
			child.SetParent (parent);
			for (int n=index+1; n<items.Count; n++)
				((TreeNode)items[n]).Index = n;
			if (marked) {
				child.TrackViewState ();
				child.SetDirty ();
				dirty = true;
			}
		}