Page History
...
The ItemList property gets and sets all the tree items in the entire control. Setting this property replaces all existing tree items with the new ones. Therefore, this property is ideally suited for initialization purposes. If you simply need to add new items, use the AddItems method instead.
This property is formatted as an @FM delimited array of tree items. Each field in the array represents a single item, and the multivalue structure for the field is as follows:
Pos | Name | Type | Description |
---|---|---|---|
<1, 1> | Level | Integer | The item's level in the tree |
<1, 2> | Key | Text | The item's unique key |
<1, 3> | Data | Text | The item's data |
<1, 4> | Data Type | ||
<1, 4, 1> | Type | Option | The item's data type, used to make sorting most accurate and efficient |
<1, 4, 2> | Format | Formatted String | The item's data format, used to present the data |
<1, 5> | Class | Text | The item's class, an application specific string that can used for classification purposes |
<1, 6> | Image | Formatted String | The item's image, either a file or a key pointing to a global image |
<1, 7> | Colors | ||
<1, 7, 1> | Text Color | Color | The color of the item's text |
<1, 7, 2> | Background | Color Fill | The item's background |
<1, 8> | Font | Font | The font used to render the item's data |
<1, 9> | Alignment | ||
<1, 9, 1> | Horizontal | Option | The horizontal alignment of the item's data |
<1, 9, 2> | Vertical | Option | The vertical alignment of the item's data |
<1, 10> | Sort | Option | The item's sort setting |
<1, 11> | Check Box | Option | The item's check box setting |
<1, 12> | Expandable | Boolean | Whether or not the item can be expanded or collapsed by the user |
<1, 13> | Height | Integer | The item's height |
<1, 14> | Hyperlink | Boolean | Whether or not the item displays hyperlink feedback to the user |
<1, 15> | Selectable | Boolean | Whether or not the item can be selected by the user |
...
The remaining values in each field initialize the new item. They are all optional, so set only those that are necessary. Usually, you will only set the Data and Class values while letting the default property settings take care of the rest. See Default Properties for more information.
See the Item property for more details.
...
Code Block |
---|
// Initialize the tree to boys and girls organized into teams // Note that we're setting only the Level, Key, Data, and Class values Items = "" // Blue Team Items<-1> = 1:@VM:"BlueTeam":@VM:"Blue Team":@VM:@VM:"BlueTeam" Items<-1> = 2:@VM:"Emma":@VM:"Emma":@VM:@VM:"Girl" Items<-1> = 2:@VM:"Ava":@VM:"Ava":@VM:@VM:"Girl" Items<-1> = 2:@VM:"Isabella":@VM:"Isabella":@VM:@VM:"Girl" Items<-1> = 2:@VM:"Sophia":@VM:"Sophia":@VM:@VM:"Girl" Items<-1> = 2:@VM:"Aiden":@VM:"Aiden":@VM:@VM:"Boy" Items<-1> = 2:@VM:"Ethan":@VM:"Ethan":@VM:@VM:"Boy" Items<-1> = 2:@VM:"Matthew":@VM:"Matthew":@VM:@VM:"Boy" Items<-1> = 2:@VM:"Noah":@VM:"Noah":@VM:@VM:"Boy" // Red Team Items<-1> = 1:@VM:"RedTeam":@VM:"Red Team":@VM:@VM:"RedTeam" Items<-1> = 2:@VM:"Madison":@VM:"Madison":@VM:@VM:"Girl" Items<-1> = 2:@VM:"Emily":@VM:"Emily":@VM:@VM:"Girl" Items<-1> = 2:@VM:"Kaitlyn":@VM:"Kaitlyn":@VM:@VM:"Girl" Items<-1> = 2:@VM:"Olivia":@VM:"Olivia":@VM:@VM:"Girl" Items<-1> = 2:@VM:"Jacob":@VM:"Jacob":@VM:@VM:"Boy" Items<-1> = 2:@VM:"Ryan":@VM:"Ryan":@VM:@VM:"Boy" Items<-1> = 2:@VM:"Jack":@VM:"Jack":@VM:@VM:"Boy" Items<-1> = 2:@VM:"Nicholas":@VM:"Nicholas":@VM:@VM:"Boy" // Unassigned Items<-1> = 1:@VM:"Unassigned":@VM:"Unassigned":@VM:@VM:"Unassigned" Items<-1> = 2:@VM:"Abigail":@VM:"Abigail":@VM:@VM:"Girl" Items<-1> = 2:@VM:"Hailey":@VM:"Hailey":@VM:@VM:"Girl" Items<-1> = 2:@VM:"Joshua":@VM:"Joshua":@VM:@VM:"Boy" Items<-1> = 2:@VM:"Logan":@VM:"Logan":@VM:@VM:"Boy" // Set the items Set_Property(@Window:".OLE_TREE", "OLE.ItemList", Items) |