TreeView Xojo plugin

TreeView Control

DefaultEvent
"SelectionChanged"

RectControl
   TreeView

control TreeView

Properties

BackColorSets or gets the background color of the control.
CancelEventActionSetting this property to true from within certain events will cancel their internal handling.
ColumnCountSets the number of columns that the TreeView should have.
DarkBackColorOverrides BackColor property when macOS Theme is dark mode.
DarkNodeTextColorOverrides NodeTextColor when macOS Theme is dark mode.
DragReceiveBehaviorUse this property to control what nodes can receive drag on them.
HasBackColorIf set to true then values will be used from BackColor and DarkBackColor properties, else attempt is made to use value from the system.
HasBorderWhen set to true the TreeView has border around it, when set to false the TreeView has no border.
HasHeaderWhen set to true then the TreeView will have column headers.
HasInactiveSelectionColorSet this property to true to let the TreeView control use a custom Selection Color when the control is inactive.
HasNodeColorIf set to true then NodeEvenColor, NodeOddColor and SystemNodeColor properties are active, else node get the resolved color for the control’s background.
HasNodeTextColorIf set to true then NodeTextColor property is active, else system color is used.
HasSelectionColorSet this property to true to let the TreeView control use a custom Selection Color.
HorizontalScrollbarValueSets or gets the value for the horizontal scrollbar.
InactiveSelectionColorSets or gets the color of the selections when the control is inactive.
LinuxDrawTreeLinesSet to true if the control is supposed to have Tree Lines when running on Linux systems.
LinuxExpanderStyleDefines the look and feel of the Expander when running on Linux systems.
LinuxHighlightFullRowSet to true to highlight the entire row when running on Linux systems.
LockDrawingTo set or get LockDrawing value.
MacDrawTreeLinesSet to true if the control is supposed to have Tree Lines when running on MacOS systems.
MacExpanderStyleDefines the look and feel of the Expander when running on MacOS systems.
MacHighlightFullRowSet to true to highlight the entire row when running on MacOS systems.
MultiSelectionIf set to true then the control will allow selecting of multiple nodes.
NodeEvenColorSets or gets the background color of even numbered nodes.
NodeHeightSets or gets the height of the nodes in the TreeView control.
NodeOddColorSets or gets the background color of odd numbered nodes.
NodeTextColorSets text color for nodes if Has NodeTextColor property is true.
QuartzShadingIf set to true then the selection will be shaded when running on MacOS X Mach-O targets.
RootNodeCountReturn the count of nodes on root level.
SelectedIndexGets the index of the last node to be added to the selection.
SelectionColorSets or gets the color of the selections.
SelectionSeparatorDecides if selected nodes should have separator between them or not.
SystemNodeColorsIf set to true then attempt is made to get system colours for even and odd nodes.
TextFontSets or gets the controls TextFont.
TextSizeSets or gets the controls Text size.
TextUnitSets the unit of the FontSize.
UseFocusRingThis property is used to determine if the TreeView should show a focus ring or not.
VerticalScrollbarMaxGets the maximum value from the Vertical Scrollbar.
VerticalScrollbarValueSets or gets the value for the vertical scrollbar.
WinDrawTreeLinesSet to true if the control is supposed to have Tree Lines when running on Windows systems.
WinHighlightFullRowSet to true to highlight the entire row when running on Windows systems.

Methods

AddToSelectionAdds a node to the existing selection when in Multiselect mode.
AppendNodeAppends a top level node to the TreeView control.
AppendNodeAppends a child node to the TreeView control.
ColumnDefaultAlignmentSets or gets default alignment for a given column.
ColumnHeaderHighResImageSets or gets the Retina high resolution header image for a specific column header.
ColumnHeaderImageSets or gets the header image for a specific column header.
ColumnHeaderImageAlignmentSets or gets the header image alignment for a specific column header.
ColumnHeaderTextSets or gets the header text for a specific column header.
ColumnWidthSets or gets the column width for a specific column.
DebugGetStructureSizeA function to get the internal structure sizes of the TreeView for each platform.
ExpandAllExpands or Collapses all nodes in the TreeView.
ExpandAncestorsOfExpands or collapses all ancestors of a given node.
GetMeasureRetrieves a measurement from a given TreeView.MeasureValues enum constant from the TreeView.
GetNodeParentGets a parent node from a given node.
GetNodeTopEdgeReturns top edge location of a node that is on screen.
IndexFromNodeGets a screen index from a given node and a given index above the node.
IndexFromNodeGets a screen index from a given node.
InsertNodeInserts a child node to the TreeView control.
InsertNodeInserts a top level node to the TreeView control.
NodeFromPointFinds a node and or control part from a given point.
NodesOnScreenReturns nodes which are on screen (Expanded) as ObjectArray.
RefreshRefreshes the control.
RemoveAllNodesRemoves all nodes from the TreeView control.
RemoveFromSelectionRemoves a node from the existing selection when in Multiselect mode.
RemoveNodeRemoves a node from the TreeView by node.
RemoveNodeRemoves a node from the TreeView by index.
RootNodesReturns a node at a root level from a given index that is relative to the parent node.
ScrollNodeToViewScrolls a node into view.
SelectNodeSelects a node by a given node. in single selection mode.
SelectedNodeGets the node that was last added to selection.
SelectedNodesReturns the selected nodes in a ObjectCollection.
SetColumnDefaultIndentSets default indents for the given column
SwapSwaps root level nodes in the tree.

Events

AfterMouseDownThis event is fired after all handling of MouseDown is complete, including repaint if needed.
BeforeDragOverHighlightThis event is fired when a node is dragged over before the highlight change will be drawn. So you can use this one for example to change icons based on the highlight state.
BeforeNodeCollapsingThis event is fired when a node is about to collapse.
BeforeNodeExpandingThis event is fired when a node is about to expand.
BeforeNodeSelectionChangeThis event is fired before state of selection on a node is changed.
BeginDragNodeThis event is fired when the user begins to drag a node.
DragExitThis event is fired when a drag item exits the control.
DragOverThis event is fired when a DragItem is over the control.
DragOverNodeThis event is fired when a DragItem is dragged over a node.
DropObjectThe item represented by obj has been dropped onto the control.
EnableMenuItemsFires when user has clicked in the menu bar or pressed a keyboard shortcut assigned to one of the menu items.
GotFocusThis event is fired when the control receives focus.
HeaderClickThis event is fired when the header is clicked.
KeyDownThis event is fired when a keyboard key is hit when the Grid has the focus.
LostFocusThis event is fired when the control looses focus.
MouseDownThis event is fired when the mouse button goes down on the control.
MouseDragThe MouseDrag event is fired when a mouse drag event is generated within the control.
MouseExitThis event is fired when the mouse exits the control.
MouseMoveThis event is fired when the mouse is moved over the control.
MouseUpThis event is fired when the mouse button goes down on the control.
NodeActionThis event is fired when actions are performed on special nodes, such as for example when a Checkbox is clicked on a TreeViewCheckboxNode.
NodeCollapsedThis event is fired after a node has collapsed.
NodeDoubleClickThis event is fired when a node gets double clicked
NodeExpandedThis event is fired after a node has expanded.
NodeMouseDownThis event is fired when the mouse is clicked on a node.
OpenThis event is fired when the control first opens on the screen.
SelectionChangedThis event is fired when the selection changes.

Enumerations

ColumnAlignmentValuesEnum that defines values for column default alignment.
PartValuesEnum that defines part codes to be used with the NodeFromPoint method.
MeasureValuesEnum that defines parts to measure with the GetMeasure function.
HeaderImageAlignmentValuesEnum that defines values to be used with the ColumnHeaderImageAlignment getter and setter methods.

Constants

Version = 8.0.2

Supported Platforms:

  • MacOS X Cocoa 32 bit
  • MacOS X Cocoa 64 bit
  • Windows 32 bit
  • Windows 64 bit
  • Linux 32 bit
  • Linux 64 bit
  • Linux ARM