gtk-sharp2.6.0.0Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details.TreeNode 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.
System.ObjectGtk.ITreeNodeSystem.Reflection.DefaultMember(MemberName="Item")MethodSystem.Int32IndexOf method
a a
Returns the child index of
or -1 if is not a child of this .
MethodSystem.VoidOnChanged methodRaises the Changed event. Call this method if any column values of the node change.ConstructorTreeNode constructorDefault constructor..PropertySystem.Int32ID propertya Read-only. Provides a unique identifier for all instances.PropertySystem.Int32ChildCounta Read-only. The number of children of this node.PropertyGtk.ITreeNodeChild indexer
a a
Returns the child at position in the list of children
for this .
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.EventGtk.TreeNodeRemovedHandlerChildRemoved eventRaised when a child is removed from the node.PropertyGtk.ITreeNodeParent propertya Read-only. The parent for this node.MethodSystem.VoidAppends a child to the node
a Adds 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.VoidInserts a child at the given position
a
Position among the node's children to insert Adds 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.MethodSystem.VoidRemoveChild method
a Removes the specified from this .
The property of is set to
and the event is raised.