HeaderPane
Main
Hide
Share Link
Print

Add Method, SftBoxItems Object

Adds a new item.

Syntax

C#int ItemIndex = object.Add(string Text);
VB.NETItemIndex = object.Add(ByVal Text As String) As Integer
C++long ItemIndex = object->Add(_bstr_t Text);
CHRESULT object->raw_Add(BSTR Text, long* ItemIndex);

object

A SftBoxItems object.

Text

The text to be added as cell text of the first (or only) column of the item.

ItemIndex

Returns the zero-based index of the item added.

Comments

The Add method adds a new item.

New items added using the Add method are always added at the end of the list. By default, new items are added at level 0. Use the Item.Level property to change an item's level.

If many items have to be added, the BulkUpdate property can be used to indicate a mass-update, which is significantly faster.

Once an item has been added, the Cell.Text property can be used to change the text for any of the available cells.

Items can be inserted at a specific location using the Items.Insert method. Items can be deleted using the Items.Remove or Items.Clear methods.

When a control is populated using Items.Add or Items.Insert, the Items.RecalcHorizontalExtent method can be used to have the control calculate the optimal horizontal scrolling area so scroll bars are enabled, depending on the Scrollbars property.

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.

See Also SftBoxItems Object | Object Hierarchy


Last Updated 11/22/2026 - (email)
© 2026 Softel vdm, Inc.