SftTree/OCX 7.0

SftTreeItem.Expand Method

Softel vdm, Inc.

Expands the item so its dependents become visible.

Syntax       

VB.NET

object.Expand(ByVal Preserve As Boolean, ByVal Depth As Boolean)

VB

object.Expand(ByVal Preserve As Boolean, ByVal Depth As Boolean)

C#.NET

void object.Expand(bool Preserve, bool Depth);

VC++

HRESULT object->Expand(VARIANT_BOOL Preserve, VARIANT_BOOL Depth);

C

HRESULT object->raw_Expand(VARIANT_BOOL Preserve, VARIANT_BOOL Depth);

Delphi

procedure object.Expand(Preserve : WordBool, Depth : WordBool);

object

A SftTreeItem object.

Preserve

Defines whether the expand/collapse state is restored.  This argument is ignored if the Depth argument is True.

Preserve

Description

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 itself is expanded and immediate dependents are made visible.  They may be expanded or collapsed based on the Depth argument.

Depth

Defines the depth of the items to become visible.

Depth

Description

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.

Comments

The Expand method expands the item so its dependents become visible.

The Expand method expands all dependent items of the item and restores the expand/collapse state of all dependent items, as saved by a previous Items.Collapse or Item.Collapse method call.

If the 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.

See Also  SftTreeItem Object | Object Hierarchy


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