Expands an item so its dependents become visible.
|VB.NET||object.Expand(ByVal ItemIndex As Integer, ByVal Preserve As Boolean, ByVal Depth As Boolean)|
|VB||object.Expand(ByVal ItemIndex As Long, ByVal Preserve As Boolean, ByVal Depth As Boolean)|
|C#.NET||void object.Expand(int ItemIndex, bool Preserve, bool Depth);|
|VC++||HRESULT object->Expand(long ItemIndex, VARIANT_BOOL Preserve, VARIANT_BOOL Depth);|
|C||HRESULT object->raw_Expand(long ItemIndex, VARIANT_BOOL Preserve, VARIANT_BOOL Depth);|
The zero-based index of the item to expand. If -1 is specified, all items on level 0 are collapsed.
Defines whether the expand/collapse state is restored. This argument is ignored if the Depth argument is True.
|True||Restores the expand/collapse state of dependent items made visible, as saved by a previous call to Items.Collapse or Item.Collapse.|
|False||The expand/collapse state is not restored. Only the item defined by ItemIndex is expanded and immediate dependents are made visible. They may be expanded or collapsed based on the Depth argument.|
Defines the depth of the items to become visible.
|True||Expands all dependent items, including non-immediate dependent items. Preserve is ignored as all dependents are expanded.|
|False||Expands dependent items, based on the Preserve settings.|
The Expand method expands an item so its dependents become visible.
If an item is already expanded when using Expand, the item remains unchanged. It does not make any indirect dependents visible. To make sure that an item's indirect dependents are shown, use the Item.Collapse method first, which collapses the item (and all dependents), followed by Expand. Now all dependents are visible.