SftTree/OCX 7.0

SftTree.Parent Property

Softel vdm, Inc.

Returns the index of an item's parent item.

Deprecated - Provided for compatibility with earlier versions only - Use Item.Parent instead

Syntax       

Get

VB.NET

ParentIndex = object.get_Parent(ByVal ItemIndex As Integer)  As Integer

VB

ParentIndex = object.Parent(ByVal ItemIndex As Long)  As Long

C#.NET

int ParentIndex = object.get_Parent(int ItemIndex);

VC++

long ParentIndex = object->Parent[long ItemIndex];
long ParentIndex = object->GetParent(long ItemIndex);

C

HRESULT object->get_Parent(long ItemIndex, long* ParentIndex);

Delphi

ParentIndex := object.Parent[ItemIndex : Integer]   : Integer;

object

A SftTree object.

ItemIndex

The zero-based index of the item whose parent item is to be returned.

ParentIndex

Returns the index of the item's immediate parent item.  If the item doesn't have a parent, -1 is returned.

Comments

Deprecated - Provided for compatibility with earlier versions only - Use Item.Parent instead

The Parent property returns the index of an item's parent item.

To find an item's top-most parent, use the Item.TopParent property instead.

Visual Basic:  The Parent property implemented by the tree control is hidden by Visual Basic's own Parent property.  To access the tree control's property use the following construct:

parentIndex = Tree1.Object.Parent(9) 

The "Object" keyword is implemented by Visual Basic to access to an object's properties directly.  See the Visual Basic documentation for more information.

.NET:  Please note the use of Ctlget_Parent, instead of Parent.  Please see "Using SftTree/OCX with .NET" for additional information.

See Also  SftTree Object | Object Hierarchy


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