Spread 8.0 Documentation
SSSetTypeComboBoxEx Function
Support Options
DLL Reference > DLL Functions > SSSetTypeComboBoxEx Function

Glossary Item Box

SSSetTypeComboBoxEx Function


See Also    ActiveX

Applies To

fpSpread DLL control

Description

Sets the style, list items, drop-down list display, edit field maximum characters, and optional control to display for the drop-down list for combo box cells.

Syntax

C

LPSS_CELLTYPE SSSetTypeComboBoxEx(HWND hWnd, LPSS_CELLTYPE lpCellType, long Style, LPCTSTR lpItems, short dMaxRows, short dMaxEditLen, short dComboWidth, HWND hWndDropDown, BYTE bAutoSearch);

C++

LPSS_CELLTYPE TSpread::SetTypeComboBoxEx(LPSS_CELLTYPE lpCellType, long Style, LPCTSTR lpItems, short dMaxRows, short dMaxEditLen, short dComboWidth, HWND hWndDropDown, BYTE bAutoSearch);

Parameters

The following parameters are available:

Parameter Description
hWnd Window handle of the fpSpread control
lpCellType Pointer to structure to contain cell type information
Style Combo box style
Use the (|) OR operator and combine the following values as indicated:
Constant Description
SS_CB_DROPDOWN Allows user to edit text portion of combo box
(If this style is not used, the text portion is static.)
Use one of the following values:
SSS_ALIGN_TOP (Default) Aligns text at the top of cells
SSS_ALIGN_BOTTOM Aligns text at the bottom of cells
SSS_ALIGN_VCENTER Centers text vertically within the cell
Use one of the following values:
SSS_ALIGN_LEFT (Default) Aligns text to the left in the cell
SSS_ALIGN_RIGHT Aligns text to the right in the cell
SSS_ALIGN_CENTER Centers text horizontally within the cell
lpItems List of items to display
(The string should be formatted with tab-delimited items.)
dMaxRows Specifies the number of rows to display in the drop-down list
dMaxEditLen Specifies the maximum number of characters of text that the user can enter in the edit field
dComboWidth Specifies the width of the drop-down list
Set this parameter as follows:
Setting Description
0 - Cell Width Sets the width to the current width of the cell
Constant: SS_COMBOWIDTH_CELLWIDTH
1 - Widest Item Sets the width to display the longest line of text in the drop-down list and aligns the list according to the description in the "Remarks" section
Constant: SS_COMBOWIDTH_AUTORIGHT
n - Right Justify Sets the width, n, where n is a negative number less than –1, of the drop-down list and right aligns the list to the selection box
n - Width Sets the width, n, where n is a positive number greater than 1, of the drop-down list and aligns the list according to the description in the "Remarks" section
–1 Right justifies the drop-down list to the selection box and sets the width to display the longest line of text in the drop-down list
Constant: SS_COMBOWIDTH_AUTOLEFT
hWndDropDown Specifies the window handle of the control to use as the drop-down list
bAutoSearch Specifies the type of search the user can perform when searching for a specific list item when the SS_CB_DROPDOWN style is not specified.
Setting Description
0 - None Removes the searching capability
Constant: SS_COMBOBOX_AUTOSEARCH_NONE
1 - Single Char (Default) Lets the user type a single search character
Constant: SS_COMBOBOX_AUTOSEARCH_SINGLECHAR
2 - Multiple Char Lets the user type more than one search character
Constant: SS_COMBOBOX_AUTOSEARCH_MULTIPLECHAR
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: SS_COMBOBOX_AUTOSEARCH_SINGLECHARGREATER

Remarks

This function is applied to the current sheet setting unless you first call the SSSetSheet function to specify the sheet for which you are calling this function.

This function initializes a structure of the specified type (SS_CELLTYPE). You can use this structure to set an individual cell or block of cells using the SSSetCellType or SSSetCellTypeRange functions.

Call this function instead of the SSSetTypeComboBox function if you want to specify one of the following features for the combo box cell:

If you want to display an empty list in the combo box, you must pass in a NULL pointer to the lpItems parameter. If instead the parameter points to an empty string, the function adds one blank item to the combo box.

The justification of the drop-down list is determined by the setting of the dComboWidth parameter as follows:

Return Value

Pointer to the SS_CELLTYPE structure, or NULL if any of the parameters are invalid.

See Also

Creating and Setting up a Combo Box Cell
Creating a Combo Box Cell Using the FarPoint fpCombo Control
Specifying the Width and Alignment of the Combo Box Drop-Down List

SSSetBool, SSSetCellType, SSSetCellTypeRange, SSSetSheet, SSSetTypeComboBox functions

ActiveX Correspondence

TypeComboBoxAutoSearch, TypeComboBoxCount, TypeComboBoxCurSel, TypeComboBoxEditable, TypeComboBoxhWnd, TypeComboBoxIndex, TypeComboBoxList, TypeComboBoxMaxDrop, TypeComboBoxString, TypeComboBoxWidth, TypeMaxEditLen properties

Copyright © GrapeCity, inc. All rights reserved.