Gtk.TreeNode Class
TreeNode abstract class

See Also: TreeNode Members

Syntax

[System.Reflection.DefaultMember("Item")]
public abstract class TreeNode : ITreeNode

Remarks

Convenience class for deriving ITreeNode implementing objects for Gtk.NodeStore implementations. This class can be subclassed to quickly implement a node type without having to implement the tree building and navigational aspects of the Gtk.ITreeNode interface.

The following example shows a simple Gtk.TreeNode subclass:

C# Example

[TreeNode(ColumnCount=1)]
public class MyTreeNode : TreeNode {
	string level;
    
	public MyTreeNode (string level)
	{
		this.level = level;
	}
    
	[TreeNodeValue(Column=0)]
	public string Level { 
		get { 
			return level; 
		} 
		set {
			level = value;
			OnChanged ();
		}
	}
}
        

The Gtk.TreeNode base class provides all the Gtk.ITreeNode details and MyTreeNode uses Gtk.TreeNode.OnChanged to notify of tree related node changes.

Requirements

Namespace: Gtk
Assembly: gtk-sharp (in gtk-sharp.dll)
Assembly Versions: 2.12.0.0