RAD Studio (Common)
|
Use the TreeView Items editor at design time to add items to a tree view component, delete items from a tree view component, or load images from disk into a tree view component. You can specify the text associated with individual tree view items, and set the image index, selected index, and state index for items.
To display the TreeView Items editor, select the TTreeView object and double-click the Items property value in the Object Inspector.
The TreeView Items editor contains an Items group box with an Items list box, a New Item button, a New SubItem button, a Delete button, and a Load button. When you first add a tree view control to a form, the Items list box is empty, and the New SubItem and Delete buttons are disabled. When you enter or change item properties for a selected item the Apply button is enabled so that you can activate changes immediately.
The TreeView Items editor contains a SubItems group box with a SubItems list box, an Add SubItem button and a Delete button.
The TreeView Items editor also contains an Item Properties group box for setting the properties of the tree view item currently selected in the Items list box. The Item Properties group box contains a Text edit box, and Image Index edit box, a Selected Index edit box, and a State Index edit box.
Create, load, and delete tree view items and subitems in the Items group box. To load a set of existing tree view items from disk, click Load. To create a new item, click New Item. Default text for the item appears in the Items list box. Specify an item's properties, including its text, in the Items Properties group box.
When you create a new item, or select an existing item, the New SubItem button is enabled so that you can nest items within other items in the tree view. If the Items list box contains items, the Delete button is also enabled. To delete an item, select it in the Items list box and click Delete.
Set the properties for a selected item in the Item Properties group box. Enter text for the item in the Text edit box. As you enter the name, it changes in the Items list box.
To display an image to the left of an item that is not currently selected, specify the index number of the image in the Image Index edit box. To suppress image display, set Image Index to -1 (the default).
To display an image to left of a selected item, specify the index number of the image in the Selected Index edit box. The index is zero-based. To suppress image display, set Selected Index to -1 (the default).
To display an additional image to the left of an item, specify the index number of the image in the State Index edit box. The index number represents an index into the StateImages property of the listview component. The index is zero-based. To suppress image display, set State Index to -1 (the default).
To display an image when an item is expanded, specify the index number of the image in the Expanded Index edit box. The index is zero-based.
To disable selecting an item, check the Enabled box. The item can still be expanded when disabled.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|