SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Defines whether an item is expanded or collapsed.
Deprecated - Provided for compatibility with earlier versions only - Use Item.Expanded instead
Get
VB.NET | Boolean = object.get_ItemExpand(ByVal ItemIndex As Integer) As Boolean |
VB | Boolean = object.ItemExpand(ByVal ItemIndex As Long) As Boolean |
C#.NET | bool Boolean = object.get_ItemExpand(int ItemIndex); |
VC++ | VARIANT_BOOL Boolean = object->ItemExpand[long ItemIndex]; VARIANT_BOOL Boolean = object->GetItemExpand(long ItemIndex); |
C | HRESULT object->get_ItemExpand(long ItemIndex, VARIANT_BOOL* Boolean); |
Put
VB.NET | object.set_ItemExpand(ByVal ItemIndex As Integer, ByVal Boolean As Boolean) |
VB | object.ItemExpand(ByVal ItemIndex As Long) = Boolean As Boolean |
C#.NET | void object.set_ItemExpand(int ItemIndex, bool Boolean); |
VC++ | VARIANT_BOOL object->ItemExpand[long ItemIndex] = Boolean; void object->PutItemExpand(long ItemIndex, VARIANT_BOOL Boolean); |
C | HRESULT object->put_ItemExpand(long ItemIndex, VARIANT_BOOL Boolean); |
object
ItemIndex
The zero-based index of the item to be expanded or collapsed.
Boolean
Defines whether the item is expanded or collapsed.
Boolean | Description |
---|---|
True | The item is expanded. |
False | The item is collapsed. |
Deprecated - Provided for compatibility with earlier versions only - Use Item.Expanded instead
The ItemExpand property defines whether an item is expanded or collapsed.
When setting ItemExpand to True, only an item's immediate dependents are made visible. Dependents of items that are made visible are not automatically made visible. The Items.Expand and Item.Expand method can be used to expand all immediate and indirect dependents.
If an item is already expanded when setting ItemExpand to True, the item remains unchanged. It does not hide any indirect dependents. To make sure that an item's indirect dependents are not shown, ItemExpand can be set to False first, which collapses the item (and all dependents), followed by setting ItemExpand to True. Now only immediate 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 ItemExpand with a leaf item.
The ItemExpand property does not preserve or 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.
If a parent item is collapsed, subsequently adding child items will automatically expand the item.
See Also SftTree Object | Object Hierarchy