Link Search Menu Expand Document

SSpread.TypeComboBoxString Property

Get and add list items in the combo box type cell.

Only valid for cells with the CellType property set to $CellTypeComboBox (combo box type). Before setting this property, use the Col , Row properties etc.

The index number set in the RowTypeComboBoxIndex property will be processed.

The index number set in the TypeComboBoxIndex property will be processed. When you refer to the value of the property, get the target one from the list item . When you assign a value to the property, add a new item at the target position of the list item. If the TypeComboBoxIndex property is -1 , add it to the end of the list items.

If you want to edit the list items of the combo box in bulk, use the TypeComboBoxList property. You can get the number of items in the list with the TypeComboBoxCount property.

Items can be deleted with the TypeComboBoxClear and TypeComboBoxRemoveItem methods.

Notes on property inheritance of combo box type cells

Use case

Col = 3;
Row = 2;
CellType = $ CellTypeComboBox;
TypeComboBoxIndex = 0;
TypeComboBoxString = "AAA";
TypeComboBoxIndex = 1;
TypeComboBoxString = "BBB";
TypeComboBoxIndex = 2;
TypeComboBoxString = "CCC";
 
BlockMode = $ TRUE;
Col = 3;
Row = 3;
Col2 = 5;
Row2 = 5;
CellType = $ CellTypeComboBox;
TypeComboBoxIndex = 0;
TypeComboBoxString = "XXX";
TypeComboBoxIndex = 1;
TypeComboBoxString = "YYY";
TypeComboBoxIndex = 2;
TypeComboBoxString = "ZZZ";
BlockMode = $FALSE;

Related item
CellType , TypeComboBoxCount , TypeComboBoxIndex , TypeComboBoxList properties
TypeComboBoxClear , TypeComboBoxRemoveItem methods