TypeComboBoxAutoSearch Property
Applies To
fpSpread control
Description
Sets or returns the type of search the user can perform when searching for a specific list item. This property is available at run time only.
Syntax
long CSpreadSheet::GetTypeComboBoxAutoSearch( );
void CSpreadSheet::SetTypeComboBoxAutoSearch(long value);
[form.]fpSpread.TypeComboBoxAutoSearch[ = setting%]
Remarks
The TypeComboBoxAutoSearch property allows the user to type one or more characters to search for an item in the list of a non-editable combo box cell.
The following settings are available:
Setting | Description |
---|---|
0 - None | Removes the searching capability |
Constant: TypeComboBoxAutoSearchNone | |
1 - Single Char | (Default) Lets the user type a single search character |
Constant: TypeComboBoxAutoSearchSingleChar | |
2 - Multiple Char | Lets the user type more than one search character |
Constant: TypeComboBoxAutoSearchMultipleChar | |
3 - Single Char (Greater or Equal) | Lets the user type a single search character and, if the search character is not found, moves to the next item starting with a greater character |
Constant: TypeComboBoxAutoSearchSingleCharGreater |
Typing a character initiates a search for the first item that begins with that character. If the item found is not visible in the list, the control scrolls to the first item that matches that character or characters. The control highlights the found item. If the search character is not found and the setting is 1 (Single Char), no item is highlighted. If the setting is 2 (Multiple Char), the selection highlighting moves to the closest available match for the search string as the characters are entered (for example, to highlight "Variegated" type "var"). If none of the items begin with the first character entered, the Spread control does not move the selection. If the setting is 3 (Single Char (Greater or Equal)), the Spread control highlights the next greater item if the search character is not found. For example, the first item starting with the letter "g" will be highlighted if the user searched for the letter "f" and none of the items begin with that letter.
For example, assume the control displays five rows and this property is set to 2 (Multiple Char). List item "Willow Springs" is in row 10 and "Wilmington" is in row 20. When you type the letter "w", the list scrolls to "Willow Springs". When you type the letters "i" and then "l", nothing changes. If the fourth letter you type is "m", the list will scroll to "Wilmington". If the fourth letter you type is "z" (no match is found), the list scrolls so that the first row is the top row in the list.
To use the TypeComboBoxAutoSearch property, specify the sheet with which you want to work by setting the Sheet property. Then specify the cell or cells to which to apply the property, as described in Using Column and Row Properties.
The TypeComboBoxAutoSearch property does not have an effect unless the CellType property is set to 8 (Combo Box) and the TypeComboBoxEditable property is set to False for the specified cell or cells.
Spread Designer
Choose the Cell menu, the Cell Type menu, the Combo Box menu, and then the Settings tab, and then select an item in the Auto Search drop-down list box in the Cell Type Settings dialog box.
Data Type
Integer (Enumerated)
See Also
Creating and Setting up a Combo Box Cell
CellType, Sheet, TypeComboBoxCurSel, TypeComboBoxCount, TypeComboBoxEditable, TypeComboBoxIndex, TypeComboBoxList, TypeComboBoxMaxDrop, TypeComboBoxString, TypeComboBoxWidth properties
DLL Correspondence
SSSetTypeComboBox, SSSetTypeComboBoxEx functions