SftBox/OCX 4.5

SftBoxItems.Copy Method

Softel vdm, Inc.

Copies an item.

Syntax       

VB.NET

ItemIndex = object.Copy(ByVal FromIndex As Integer, ByVal ToIndex As Integer)  As Integer

VB

ItemIndex = object.Copy(ByVal FromIndex As Long, ByVal ToIndex As Long)  As Long

C#.NET

int ItemIndex = object.Copy(int FromIndex, int ToIndex);

VC++

long ItemIndex = object->Copy(long FromIndex, long ToIndex);

C

HRESULT object->raw_Copy(long FromIndex, long ToIndex, long* ItemIndex);

Delphi

ItemIndex := object.Copy(FromIndex : Integer; ToIndex : Integer)   : Integer;

object

A SftBoxItems object.

FromIndex

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

ToIndex

The zero-based index of the position where the new, copied item will be inserted. Specify -1 to add the new item at the end of the list.

ItemIndex

Returns the zero-based index of the new item after it has been copied to the new position.

Comments

The Copy method copies an item.

The Copy method copies all item attributes.

The target ToIndex cannot be inside the group of items to be copied.

Items can also be copied using the Items.CopyAfter method. An item can be moved using the Items.Move method.

The drop down portion is automatically hidden when the combo box contents are changed using this method. The DropDown.SuppressOn method can be used to suppress hiding the drop down portion when adding/inserting items.


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