gtk-sharpGtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details.System.ObjectGtk.ITreeNodeTreeNode abstract class
Convenience class for deriving ITreeNode implementing objects for
implementations. This class can be subclassed
to quickly implement a node type without having to implement the tree building
and navigational aspects of the interface.
The following example shows a simple subclass:
[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 base class provides all the
details and MyTreeNode uses to notify of tree related
node changes.
ConstructorTreeNode constructorDefault constructor..MethodSystem.Void
a Appends a child to the nodeAdds the specified to this .
The is added to the end of the children list, the
property of is set to
this node, and the event is raised.MethodSystem.Void
a
Position among the node's children to insert Inserts a child at the given positionAdds the specified to this .
The is added to the children list before the child currently
at position , the
property of is set to this node, and the
event is raised.EventSystem.EventHandlerChanged event
Raised when the contents of the change.
Use for a convenient way to raise the event.
EventGtk.TreeNodeAddedHandlerChildAdded eventRaised when a child is added to the node.PropertySystem.Int32ChildCounta Read-only. The number of children of this node.EventGtk.TreeNodeRemovedHandlerChildRemoved eventRaised when a child is removed from the node.PropertySystem.Int32ID propertya Read-only. Provides a unique identifier for all instances.MethodSystem.Int32
a IndexOf methoda
Returns the child index of
or -1 if is not a child of this .
PropertyGtk.ITreeNode
a Child indexera
Returns the child at position in the list of children
for this .
MethodSystem.VoidOnChanged methodRaises the Changed event. Call this method if any column values of the node change.PropertyGtk.ITreeNodeParent propertya Read-only. The parent for this node.MethodSystem.Void
a RemoveChild methodRemoves the specified from this .
The property of is set to
and the event is raised.