Hide

SftTree/OCX 7.5 - ActiveX Tree Control

Display
Print

ItemExpandAll Property, SftTree Object

Defines an item and all its dependents as expanded or collapsed.

Deprecated - Provided for compatibility with earlier versions only - Use Item.Expand or Item.Collapse instead

Syntax

Put

VB.NETobject.ItemExpandAll(ByVal ItemIndex As Integer) = (null) As Boolean
VBobject.ItemExpandAll(ByVal ItemIndex As Long) = (null) As Boolean
C#.NETvoid object.set_ItemExpandAll(int ItemIndex, bool (null));
VC++VARIANT_BOOL object->ItemExpandAll[long ItemIndex] = (null);
void object->PutItemExpandAll(long ItemIndex, VARIANT_BOOL (null));
CHRESULT object->put_ItemExpandAll(long ItemIndex, VARIANT_BOOL (null));

object

A SftTree object.

ItemIndex

The zero-based index of the item to be expanded or collapsed.

Boolean

Defines whether the item is expanded or collapsed.

BooleanDescription
TrueThe item is expanded. All immediate and indirect dependents of the specified item are made visible.
FalseThe item is collapsed. All immediate and indirect dependents of the specified item are hidden.

Comments

Deprecated - Provided for compatibility with earlier versions only - Use Item.Expand or Item.Collapse instead

The ItemExpandAll property defines an item and all its dependents as expanded or collapsed.

If an item is already expanded when setting ItemExpandAll to True, the item remains unchanged. It does not make any indirect dependents visible. To make sure that an item's indirect dependents are shown, ItemExpandAll can be set to False first, which collapses the item (and all dependents), followed by setting ItemExpandAll to True. Now all dependents are visible.

An item has to be currently shown to be expanded or collapsed. If the item is not shown, its state cannot be modified. The Item.Shown property can be used to determine if an item is shown.

The Item.DependentCount property can be used to determine if an item can be expanded. If an item doesn't have any dependents, it is a leaf item and cannot be expanded. However, it is not an error to use ItemExpandAll with a leaf item.

The ItemExpandAll property does not restore the expand/collapse state of its dependent items. Use Items.Expand, Item.Expand, Items.Collapse and Item.Collapse to preserve or restore this information.

See Also SftTree Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.