Difference between revisions of "Tree"
From Lianjapedia
Yvonne.milne (Talk | contribs) |
Helen.george (Talk | contribs) |
||
Line 1: | Line 1: | ||
+ | Note: property, method and event names should be referred to in lowercase in case-sensitive scripting languages. | ||
+ | |||
====Properties==== | ====Properties==== | ||
Line 9: | Line 11: | ||
!width="50%"|Description | !width="50%"|Description | ||
|- | |- | ||
− | | | + | |valign="top"|GridLines |
+ | |valign="top"|RW | ||
+ | |valign="top"|Boolean | ||
+ | |valign="top"|Whether grid lines should be displayed | ||
+ | |- | ||
+ | |valign="top"|AlternatingRowColors | ||
+ | |valign="top"|RW | ||
+ | |valign="top"|Boolean | ||
+ | |valign="top"|Whether alternating rows should have different background colors | ||
+ | |- | ||
+ | |ActiveRow | ||
|RW | |RW | ||
− | | | + | |Numeric |
− | | | + | |Currently selected row |
|- | |- | ||
− | | | + | |ActiveColumn |
|RW | |RW | ||
− | | | + | |Numeric |
− | | | + | |Currently selected column |
|- | |- | ||
− | | | + | |CurrentItem |
|RW | |RW | ||
− | | | + | |Object |
− | | | + | |Currently selected object |
|- | |- | ||
− | | | + | |ColumnCount |
|RW | |RW | ||
− | | | + | |Numeric |
− | | | + | |Number of tree columns |
|- | |- | ||
− | | | + | |ColumnWidths |
|RW | |RW | ||
− | | | + | |Character |
− | | | + | |Comma-separated list of column widths |
|- | |- | ||
− | |Headerlabels | + | |valign="top"|ShowChildIndicator |
− | |W | + | |valign="top"|RW |
− | | | + | |valign="top"|Boolean |
− | | | + | |valign="top"|Whether indicator should be displayed if item has child items |
+ | |- | ||
+ | |valign="top"|RootIsDecorated | ||
+ | |valign="top"|RW | ||
+ | |valign="top"|Boolean | ||
+ | |valign="top"|Whether control for expanding and collapsing shoule be displayed | ||
+ | |- | ||
+ | |valign="top"|SortingEnabled | ||
+ | |valign="top"|RW | ||
+ | |valign="top"|Boolean | ||
+ | |valign="top"|Whether items in tree can be sorted | ||
+ | |- | ||
+ | |valign="top"|IgnoreParentClicks | ||
+ | |valign="top"|RW | ||
+ | |valign="top"|Boolean | ||
+ | |valign="top"|Whether clicking on parent items should be ignored by click event (default). Parent items can be expanded/collapsed by double-click | ||
+ | |- | ||
+ | |valign="top"|Headerlabels | ||
+ | |valign="top"|W | ||
+ | |valign="top"|Character | ||
+ | |valign="top"|Labels displayed in column headers | ||
+ | |- | ||
+ | |valign="top"|NewIndex | ||
+ | |valign="top"|R | ||
+ | |valign="top"|Numeric | ||
+ | |valign="top"|The index to be given to a new top level item (one more than current number of top level items) | ||
+ | |- | ||
+ | |valign="top"|ListCount | ||
+ | |valign="top"|R | ||
+ | |valign="top"|Numeric | ||
+ | |valign="top"|Number of top level items | ||
+ | |- | ||
+ | |valign="top"|RowCount | ||
+ | |valign="top"|R | ||
+ | |valign="top"|Numeric | ||
+ | |valign="top"|Number of rows | ||
+ | |- | ||
+ | |valign="top"|RowSource | ||
+ | |valign="top"|RW | ||
+ | |valign="top"|Character | ||
+ | |valign="top"|Source of data to which the object is bound | ||
+ | |- | ||
+ | |valign="top"|RowSourceType | ||
+ | |valign="top"|RW | ||
+ | |valign="top"|Numeric | ||
+ | |valign="top"|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 | ||
|- | |- | ||
|} | |} | ||
Line 50: | Line 107: | ||
!width="50%"|Description | !width="50%"|Description | ||
|- | |- | ||
− | | | + | |valign="top"|AddItem |
− | | | + | |valign="top"|[icon as Character,] caption as Character |
− | | | + | |valign="top"|Add an item, specifying the item caption and optionally an icon filename |
+ | |- | ||
+ | |valign="top"|AddListItem | ||
+ | |valign="top"|caption as Character[, row as Numeric[, column as Numeric]] | ||
+ | |valign="top"|Add an item, specifying the item caption and optionally the row and column position | ||
+ | |- | ||
+ | |valign="top"|AddItems | ||
+ | |valign="top"|selectstring as Character | items as Array[, icon as Character] | ||
+ | |valign="top"|Add items based on an SQL SELECT query or from an array, optionally including an icon filename | ||
|- | |- | ||
− | | | + | |valign="top"|AddObject |
− | | | + | |valign="top"|existing as Object || newobject as Character, class as Character[, icon as Character] [, caption as Character] |
− | | | + | |valign="top"|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. |
|- | |- | ||
− | | | + | |RemoveObject |
− | | | + | |existing as Object |
− | | | + | |Remove the specified object |
|- | |- | ||
− | | | + | |RemoveItem |
− | | | + | |row as Numeric |
− | | | + | |Remove the item at the specified row |
|- | |- | ||
|Clear | |Clear | ||
− | | | + | |None |
− | | | + | |Clear the tree |
|- | |- | ||
− | | | + | |ExpandAll |
− | | | + | |None |
− | | | + | |Expand all top level items |
|- | |- | ||
− | | | + | |CollapseAll |
− | | | + | |None |
− | | | + | |Collapse all top level items |
|- | |- | ||
|Backcolor | |Backcolor | ||
− | | | + | |column as Numeric, color as Numeric or Character |
− | | | + | |Set the background color for the specified column |
|- | |- | ||
|Forecolor | |Forecolor | ||
− | | | + | |column as Numeric, color as Numeric or Character |
− | | | + | |Set the foreground color for the specified column |
|- | |- | ||
− | |Alignment | + | |valign="top"|Alignment |
− | | | + | |valign="top"|column as Numeric, alignment as Numeric |
− | | | + | |valign="top"|Set the alignment for the specified column: 0 = left, 1 = right, 2 = center |
|- | |- | ||
|} | |} |
Revision as of 10:55, 10 January 2013
Note: property, method and event names should be referred to in lowercase in case-sensitive scripting languages.
Properties
This class supports the Common Properties plus the following:
Property | Access (R/RW) | Value | Description |
---|---|---|---|
GridLines | RW | Boolean | Whether grid lines should be displayed |
AlternatingRowColors | RW | Boolean | Whether alternating rows should have different background colors |
ActiveRow | RW | Numeric | Currently selected row |
ActiveColumn | RW | Numeric | Currently selected column |
CurrentItem | RW | Object | Currently selected object |
ColumnCount | RW | Numeric | Number of tree columns |
ColumnWidths | RW | Character | Comma-separated list of column widths |
ShowChildIndicator | RW | Boolean | Whether indicator should be displayed if item has child items |
RootIsDecorated | RW | Boolean | Whether control for expanding and collapsing shoule be displayed |
SortingEnabled | RW | Boolean | Whether items in tree can be sorted |
IgnoreParentClicks | RW | Boolean | Whether clicking on parent items should be ignored by click event (default). Parent items can be expanded/collapsed by double-click |
Headerlabels | W | Character | Labels displayed in column headers |
NewIndex | R | Numeric | The index to be given to a new top level item (one more than current number of top level items) |
ListCount | R | Numeric | Number of top level items |
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 |
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 |
AddListItem | caption as Character[, row as Numeric[, column as Numeric]] | Add an item, specifying the item caption and optionally the row and column position |
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 |
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. |
RemoveObject | existing as Object | Remove the specified object |
RemoveItem | row as Numeric | Remove the item at the specified row |
Clear | None | Clear the tree |
ExpandAll | None | Expand all top level items |
CollapseAll | None | Collapse all top level items |
Backcolor | column as Numeric, color as Numeric or Character | Set the background color for the specified column |
Forecolor | column as Numeric, color as Numeric or Character | Set the foreground color for the specified column |
Alignment | column as Numeric, alignment as Numeric | Set the alignment for the specified column: 0 = left, 1 = right, 2 = center |
Events
This class supports the Common Events plus the following:
Event | Args | Description |
---|