SftTree/OCX 7.0

SftTree.Collapse Method

Softel vdm, Inc.

Collapses an item so its dependents are no longer visible.

Deprecated - Provided for compatibility with earlier versions only - Use Items.Collapse and Item.Collapse instead

Syntax       

VB.NET

object.Collapse(ByVal ItemIndex As Integer, ByVal Preserve As Boolean)

VB

object.Collapse(ByVal ItemIndex As Long, ByVal Preserve As Boolean)

C#.NET

void object.Collapse(int ItemIndex, bool Preserve);

VC++

HRESULT object->Collapse(long ItemIndex, VARIANT_BOOL Preserve);

C

HRESULT object->raw_Collapse(long ItemIndex, VARIANT_BOOL Preserve);

Delphi

procedure object.Collapse(ItemIndex : Integer, Preserve : WordBool);

object

A SftTree object.

ItemIndex

The zero-based index of the item to collapse.  If -1 is specified, all items on level 0 are collapsed.

Preserve

Defines whether the expand/collapse state is preserved.

Preserve

Description

True

Preserves the expand/collapse state of dependent items that are made no longer visible.  A subsequent call to Items.Expand or Item.Expand will restore the items with the remembered expand/collapse state.

False

The expand/collapse state is not preserved.

Comments

Deprecated - Provided for compatibility with earlier versions only - Use Items.Collapse and Item.Collapse instead

The Collapse method collapses an item so its dependents are no longer visible.

The Collapse method collapses all dependent items of item ItemIndex and saves the expand/collapse state of all dependent items, so it can be restored by a subsequent Items.Expand or Item.Expand method call.

If a parent item is collapsed, subsequently adding child items will automatically expand the item.

See Also  SftTree Object | Object Hierarchy


Feedback / comments / error reports for this topic
© 2015 - Softel vdm, Inc. - www.softelvdm.com