Add Method

Applies to TestComplete 15.70, last modified on December 17, 2024

Adds a new item to the collection.

Declaration

collectionObj.Add()
collectionObj     One of the objects listed in the Applies To  
Result     One of the objects listed in the Return Value section  

Applies To

This method applies to the following objects:

TcxEditButtons, TcxRadioGroupItems

Description

The Add method lets you create a new item in the collection represented by the given collectionObj object. Use the Caption property of the returned object to specify the caption of the newly created item.

Return Value

The returned object provides access to the newly created item.

Remarks

If you add several items to the collection at a time using the Add method, it is recommended that you call the BeginUpdate method before modifying the collection, and the EndUpdate method after the changes are made. This will prevent the control holding the given collection from repainting while the collection is being modified. This approach optimizes performance.

See Also

BeginUpdate Method
Clear Method
Delete Method
EndUpdate Method

Highlight search results