IndentedList
Object List Hierarchy Next Object
Definition:
A ListBox that can display elements offset from the left margin. It is
commonly used to portray the concept of a hierarchy, where each element can have a
parent and one or more children
Icon:
Specialized Features:
The following tables list and describe the properties, methods, and events
added by IndentedList:
Properties Use to...
ExpandOnDblClick Permit or deny an Expand event when an item in the list is double clicked.
HighlightStyle Determine how much of the line will be highlighted.
IconBitmap Reference the bitmap to be used for the icons in the list.
IconHeight Set the height for the icons in the list.
IconWidth Set the width for the icons in the list.
IndentWidth Set the amount to indent items in the list.
ListCount Specify the number of items in an IndentedList control.
ListIndex Return the index number of the currently selected item in an indented list.
MultiSelect Determine whether the list box is a single-selection or multi-selection list.
SelCount Give the number of items currently selected in a list.
Sorted Determine whether the items in a list box are automatically sorted
alphabetically by Phoenix.
Text Determine the selected item in the list box.
Underline Underline all the items in the list.
Methods Use to...
AddItem Add a new item to a list box.
Clear Empty the contents of the indented list.
CollapseItem Remove all the children of the given item.
ExpandItem Detail how to insert the children of an item when that item is expanded.
FindIndexUnderPoint Find the index of the item in the list that is beneath an x-y coordinate.
InsertItem Add an item at a specific location with a specific indent.
ItemCanExpand Determine if an item can receive an Expand event.
ItemData Determine the Data associated with an item.
ItemIsExpanded Determine whether an item has children.
ItemIcon Determine the numeric index of an item’s icon.
ItemLevel Determine the level of an item.
ItemObject Determine the Object associated with an item.
ItemString Determine the string associated with an item, this is also what is displayed
in the ListBox.
ItemTextColor
ItemTextStyle
RemoveItem Remove a specified item from a list box.
Reset Refresh the Icons in the list.
Selected Return TRUE if the list item at the given index is selected, FALSE if it is
not selected or if the list index is invalid.
SetItemCanExpand Permit or deny an item from being able to receive an Expand event.
SetItemData Associate a value with an item.
SetItemIcon Set the icon for an item.
SetItemLevel Set the level of an item.
SetItemObject Associate an Object with an item.
SetItemString Set the string that is displayed in the ListBox.
SetItemTextColor
SetItemTextStyle
SetSelected Change the selection state of the item at the given index according to the
value of the "sel" parameter.
Events Use to...
Click Perform an action when the user presses and releases a mouse button while on
an object, or when the value of a control is changed in code.
Collapsed Determine when an item is collapsed.
DblClick Perform an action when the user presses and releases a mouse button twice in
rapid succession over an object.
Expand Determine when an expandable item has been expanded.
GotFocus Define what occurs when an object is given the focus.
KeyDown Define what occurs when the user presses a key while an object has the focus.
KeyPress Define what occurs when the user presses and releases an ANSI key.
KeyUp Define what occurs when the user releases a key while an object has the focus.
LostFocus Define what occurs when an object loses the focus.
Copied Features:
Properties
Methods
Events
Details:
An IndentedList can be used in the same way as a normal ListBox, but with
additional features. It’s primary use is to simulate hierarchal schemes, where items may have a single
parent, one or more siblings, and/or one or more children. An example of this
is a directory tree, where every directory can be top-level, contained in
another directory, have similar directories at the same level, and/or contain other
directories.
The SetItemData and SetItemObject can be used to map IndentedLists to object
structures, or any structure with a linear order. The SetItemLevel represents
the hierarchical scheme visually, making it easier to understand. SetItemIcon can
be used to differentiate the various types of items (i.e. a file from a
directory or an expanded directory from a closed one).
The system understands how to Collapse an item, but expanding an item must be
detailed in the ExpandItem method. Telling any item to Collapse will remove
every item in the list between the selected item and the next sequential item in
the list with the same or higher level than the selected item.