AddListItem Method

Adds a new item to a ComboBox or ListBox control, optionally making it possible for you to specify the item's item ID.

Control.AddListItem(cItem [, nItemID] [, nColumn])

Parameters

cItem

Specifies the item to add to the control.

nItemID

Specifies an integer representing the unique ID of the item in the control. The maximum value you can specify for nItemID is 32,767.

If you omit nItemID and the Sorted property is set to True (.T.), cItem is added in alphabetic sort order. If you omit nItemID and the Sorted property is set to False (.F.), cItem is added to the end of the list of the ComboBox or ListBox.

nColumn

Specifies the column of the control to add the new item to. The default is 1.

Expand imageRemarks

Expand imageExample

Expand imageSee Also


© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic