TreeView Xojo plugin

TreeViewNode Class

TreeViewNode is a class that represents nodes in the TreeView.

Note:
You can inherit from the TreeViewNode and add your own data properties to it.

Warning:
A TreeViewNode can not be reused in any way. This means that a node may not be put in two different TreeView controls or twice in the same unless if the node has first been removed from the TreeView that it was in.

Object
   TreeViewNode

class TreeViewNode

Constructors

TreeViewNodeA constructor that takes a text.
TreeViewNodeA constructor that takes a text and a image.
TreeViewNodeA constructor that takes a text, image and true or false depending on if the node should have expander or not.
TreeViewNodeA constructor that takes text, image and dark mode image.
TreeViewNodeA constructor that takes text, image, dark mode image and and true or false depending on if the node should have expander or not.

Properties

DarkModeImageImage to be used when in dark mode.
FontBoldSet this property to true to let the node text be drawn bold faced.
FontItalicSet this property to true to let the node text be drawn italic faced.
FontUnderlineSet this property to true to let the node text be drawn with text underline style.
HasExpanderUse this property to force a node to have a expander even if it has no child nodes.
HasTextColorIf set to true then TextColor property is active and will override Text color setting coming from the TreeView Control.
ImageSets or gets the node image.
ItemDataA property to store custom data on the node.
TextSets or gets the text of a node.
TextColorSets the text color of a node.

Methods

AddSubItemAdds text to additional columns of the node.
AddSubItemAdds text and alignment to additional columns of the node.
AppendNodeAppends a child node to the current node.
DepthReturns the depth of the node in the tree.
ExpandedReturns true if the node is expanded.
GetTextOffsetReturns x location where text starts to draw on a node, taking into account indents, expanders and icons.
IndexReturns the Screen Index of the node.
IndexOfFinds a index of a child node relative to the parent.
InsertNodeInserts a child node at a given index to the current node.
ItemAlignmentSets or gets the alignment for a specific column.
ItemTextSets or gets the text for a specific column.
NodeReturns a child node at a given index.
NodeCountReturns the count of child nodes.
RemoveChildRemoves a child node.
RemoveChildAtRemoves a child node at a index that is relative to the parent node.
SelectedReturns true if the node is currently selected.
SetExpandedExpands or collapses the node.
SetItemIndentSets Left or Right indent for the sub item
SortNodesSorts children of the node, using compare delegate to compare the nodes.
SwapSwaps child nodes of the given node instance.

Delegates

NodeCompareDelegate (console safe) Delegate to use for comparing when sorting TreeViewNodes.

Enumerations

AlignmentValuesEnum that defines values for TreeViewNode alignments.

Supported Platforms:

  • macOS Intel 32 bit
  • macOS Intel 64 bit
  • macOS Apple Silicon
  • Windows 32 bit
  • Windows 64 bit
  • Windows ARM 64 bit
  • Linux 32 bit
  • Linux 64 bit
  • Linux ARM 32 bit
  • Linux ARM 64 bit