Difference between revisions of "Tree"
From Lianjapedia
Helen.george (Talk | contribs) |
Helen.george (Talk | contribs) |
||
| Line 11: | Line 11: | ||
!width="50%"|Description | !width="50%"|Description | ||
|- | |- | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
|ActiveColumn | |ActiveColumn | ||
|RW | |RW | ||
| Line 31: | Line 17: | ||
|Currently selected column | |Currently selected column | ||
|- | |- | ||
| − | | | + | |ActiveRow |
|RW | |RW | ||
| − | | | + | |Numeric |
| − | |Currently selected | + | |Currently selected row |
|- | |- | ||
| + | |valign="top"|AlternatingRowColors | ||
| + | |valign="top"|RW | ||
| + | |valign="top"|Boolean | ||
| + | |valign="top"|Whether alternating rows should have different background colors | ||
| + | |- | ||
| + | |||
| + | |||
|ColumnCount | |ColumnCount | ||
|RW | |RW | ||
| Line 46: | Line 39: | ||
|Comma-separated list of column widths | |Comma-separated list of column widths | ||
|- | |- | ||
| − | | | + | |CurrentItem |
| − | + | |RW | |
| − | | | + | |Object |
| − | | | + | |Currently selected object |
|- | |- | ||
| − | |valign="top"| | + | |valign="top"|GridLines |
|valign="top"|RW | |valign="top"|RW | ||
|valign="top"|Boolean | |valign="top"|Boolean | ||
| − | |valign="top"|Whether | + | |valign="top"|Whether grid lines should be displayed |
|- | |- | ||
| − | |valign="top"| | + | |
| − | |valign="top"| | + | |
| − | |valign="top"| | + | |valign="top"|Headerlabels |
| − | |valign="top"| | + | |valign="top"|W |
| + | |valign="top"|Character | ||
| + | |valign="top"|Labels displayed in column headers | ||
|- | |- | ||
|valign="top"|IgnoreParentClicks | |valign="top"|IgnoreParentClicks | ||
| Line 66: | Line 61: | ||
|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"|Whether clicking on parent items should be ignored by click event (default). Parent items can be expanded/collapsed by double-click | ||
|- | |- | ||
| − | |valign="top"| | + | |valign="top"|ListCount |
| − | |valign="top"| | + | |valign="top"|R |
| − | |valign="top"| | + | |valign="top"|Numeric |
| − | |valign="top"| | + | |valign="top"|Number of top level items |
|- | |- | ||
|valign="top"|NewIndex | |valign="top"|NewIndex | ||
| Line 76: | Line 71: | ||
|valign="top"|The index to be given to a new top level item (one more than current number of top level items) | |valign="top"|The index to be given to a new top level item (one more than current number of top level items) | ||
|- | |- | ||
| − | |valign="top"| | + | |valign="top"|RootIsDecorated |
| − | |valign="top"| | + | |valign="top"|RW |
| − | |valign="top"| | + | |valign="top"|Boolean |
| − | |valign="top"| | + | |valign="top"|Whether control for expanding and collapsing shoule be displayed |
|- | |- | ||
|valign="top"|RowCount | |valign="top"|RowCount | ||
| Line 95: | Line 90: | ||
|valign="top"|Numeric | |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 | |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 | ||
| + | |- | ||
| + | |valign="top"|ShowChildIndicator | ||
| + | |valign="top"|RW | ||
| + | |valign="top"|Boolean | ||
| + | |valign="top"|Whether indicator should be displayed if item has child items | ||
| + | |- | ||
| + | |valign="top"|SortingEnabled | ||
| + | |valign="top"|RW | ||
| + | |valign="top"|Boolean | ||
| + | |valign="top"|Whether items in tree can be sorted | ||
|- | |- | ||
|} | |} | ||
| Line 110: | Line 115: | ||
|valign="top"|[icon as Character,] caption as Character | |valign="top"|[icon as Character,] caption as Character | ||
|valign="top"|Add an item, specifying the item caption and optionally an icon filename | |valign="top"|Add an item, specifying the item caption and optionally an icon filename | ||
| − | |||
| − | |||
| − | |||
| − | |||
|- | |- | ||
|valign="top"|AddItems | |valign="top"|AddItems | ||
|valign="top"|selectstring as Character | items as Array[, icon as Character] | |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"|Add items based on an SQL SELECT query or from an array, optionally including 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"|AddObject | |valign="top"|AddObject | ||
| Line 123: | Line 128: | ||
|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. | |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. | ||
|- | |- | ||
| − | | | + | |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 |
|- | |- | ||
| − | | | + | |Backcolor |
| − | | | + | |column as Numeric, color as Numeric or Character |
| − | | | + | |Set the background color for the specified column |
|- | |- | ||
|Clear | |Clear | ||
|None | |None | ||
|Clear the tree | |Clear the tree | ||
| − | |||
| − | |||
| − | |||
| − | |||
|- | |- | ||
|CollapseAll | |CollapseAll | ||
| Line 143: | Line 144: | ||
|Collapse all top level items | |Collapse all top level items | ||
|- | |- | ||
| − | | | + | |ExpandAll |
| − | | | + | |None |
| − | | | + | |Expand all top level items |
|- | |- | ||
|Forecolor | |Forecolor | ||
| Line 151: | Line 152: | ||
|Set the foreground color for the specified column | |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 | ||
|- | |- | ||
|} | |} | ||
Revision as of 11:11, 30 April 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 |
|---|---|---|---|
| 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 | Currently selected 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 |
| 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 shoule 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 |
| 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 |
| 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 |
Events
This class supports the Common Events plus the following:
| Event | Args | Description |
|---|