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

Glossary Item Box

SSSetTypeComboBox Function


See Also    ActiveX

Applies To

fpSpread DLL control

Description

Sets the style and list items for combo box cells.

Syntax

C

LPSS_CELLTYPE SSSetTypeComboBox(HWND hWnd, LPSS_CELLTYPE lpCellType, long Style, LPCTSTR lpItems);

C++

LPSS_CELLTYPE TSpread::SetTypeComboBox(LPSS_CELLTYPE lpCellType, long Style, LPCTSTR lpItems);

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.)

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.

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.

Return Value

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

See Also

Creating Combo Box Cells

SSSetCellType, SSSetCellTypeRange, SSSetSheet, SSSetTypeComboBoxEx functions

ActiveX Correspondence

TypeComboBoxCount, TypeComboBoxCurSel, TypeComboBoxEditable, TypeComboBoxIndex, TypeComboBoxList, TypeComboBoxString properties

Copyright © GrapeCity, inc. All rights reserved.