Tree

From Lianjapedia
Revision as of 05:25, 13 April 2018 by Yvonne.milne (Talk | contribs)

Jump to: navigation, search

Note: property, method and event names should be referred to in lowercase in case-sensitive scripting languages.

Description

Tree

Trees are grids that allow you to drill down through levels of hierarchical Treeitem nodes.

Properties

This class supports the Common Properties plus the following:

Property Access (R/RW) Value Description
ActiveColumn RW Numeric Currently selected column
ActiveRow RW Numeric Currently selected row
AlternatingRowColors RW Boolean Whether alternating rows should have different background colors
ColumnCount RW Numeric Number of tree columns
ColumnWidths RW Character Comma-separated list of column widths
CurrentItem RW Object Reference to currently selected Treeitem object
GridLines RW Boolean Whether grid lines should be displayed
Headerlabels W Character Labels displayed in column headers
IgnoreParentClicks RW Boolean Whether clicking on parent items should be ignored by click event (default). Parent items can be expanded/collapsed by double-click
KineticScrolling RW Boolean Whether kinetic scrolling is enabled, default is False. With kinetic scrolling, the user can flick in a given direction and it will continue to scroll in this direction until it is stopped either by the user or by friction. Setting KineticScrolling to true provides touch scrolling on touch aware devices and left mouse button pressed and moved scrolling on non-touch aware devices.
ListCount R Numeric Number of top level items
NewIndex R Numeric The index to be given to a new top level item (one more than current number of top level items)
RootIsDecorated RW Boolean Whether control for expanding and collapsing should be displayed
RowCount R Numeric Number of rows
RowSource RW Character Source of data to which the object is bound
RowSourceType RW Numeric Type of Source of data to which the object is bound: 1 = comma-separated string, 2 = table, 3 = SQL statement, 5 = array, 6 = comma-separated fieldlist, 8 = table field structure
ShowChildIndicator RW Boolean Whether indicator should be displayed if item has child items
ShowCheckBox RW Boolean Whether a checkBox should be displayed at the start of the item. Note: if this is True, starting the item caption with + or - checks/unchecks the checkBox for the item.
SortingEnabled RW Boolean Whether items in tree can be sorted

Methods

This class supports the Common Methods plus the following:

Method Args Description
AddItem [icon as Character,] caption as Character Add an item, specifying the item caption and optionally an icon filename
AddItems selectstring as Character | items as Array[, icon as Character] Add items based on an SQL SELECT query or from an array, optionally including an icon filename
AddListItem caption as Character[, row as Numeric[, column as Numeric]] Add an item, specifying the item caption and optionally the row and column position. The caption can include an icon and delegate when defined as 'captionText#icon#delegate'.
AddObject existing as Object || newobject as Character, class as Character[, icon as Character] [, caption as Character] Add an existing object or a new object, in which case the object's class must also be specified. An icon filename and display caption can optionally be included.
Alignment column as Numeric, alignment as Numeric Set the alignment for the specified column: 0 = left, 1 = right, 2 = center
Backcolor column as Numeric, color as Numeric or Character Set the background color for the specified column
Clear None Clear the tree
CollapseAll None Collapse all top level items
ExpandAll None Expand all top level items
Forecolor column as Numeric, color as Numeric or Character Set the foreground color for the specified column
RemoveItem row as Numeric Remove the item at the specified row
RemoveObject existing as Object Remove the specified object
SetListItem caption as Character[, row as Numeric[, column as Numeric]] Add an item, specifying the item caption and optionally the row and column position. The caption can include an icon and delegate when defined as 'captionText#icon#delegate'.

Events

This class supports the Common Events plus the following:

Event Args Description