SftTree/OCX 7.0

SftTree.CopyItem Method

Softel vdm, Inc.

Copies an item to a new position in the tree control.

Deprecated - Provided for compatibility with earlier versions only - Use Items.Copy instead

Syntax       

VB.NET

NewIndex = object.CopyItem(ByVal FromIndex As Integer, ByVal ToIndex As Integer)  As Integer

VB

NewIndex = object.CopyItem(ByVal FromIndex As Long, ByVal ToIndex As Long)  As Long

C#.NET

int NewIndex = object.CopyItem(int FromIndex, int ToIndex);

VC++

long NewIndex = object->CopyItem(long FromIndex, long ToIndex);

C

HRESULT object->raw_CopyItem(long FromIndex, long ToIndex, long* NewIndex);

Delphi

NewIndex := object.CopyItem(FromIndex : Integer; ToIndex : Integer)   : Integer;

object

A SftTree object.

FromIndex

The zero-based index of the item to be copied.

ToIndex

The zero-based index of the position where the item is to be inserted.  If ToIndex is -1, the item will be added at the end of the list.

NewIndex

Returns the zero-based index of the newly inserted item.

Comments

Deprecated - Provided for compatibility with earlier versions only - Use Items.Copy instead

The CopyItem method copies an item to a new position in the tree control.

The CopyItem method copies all item attributes, including cell text, graphics, level, row header contents, etc.  Also copied are the properties Cell.Data, Cell.DataString, Item.Data, etc.  If these values should remain unique in an application, they have to be explicitly changed after copying items.  The Item.DataString property is copied based on the settings of the CopyItemDataString property.

A group of items can be copied using the Items.Copy method.  Items can be moved using the Items.Move method.

See Also  SftTree Object | Object Hierarchy


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