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

Glossary Item Box

SSSetTypeStaticText Function


See Also    ActiveX

Applies To

fpSpread DLL control

Description

Sets parameters for static text cells.

Syntax

C

LPSS_CELLTYPE SSSetTypeStaticText(HWND hWnd, LPSS_CELLTYPE lpCellType, long TextStyle);

C++

LPSS_CELLTYPE TSpread::SetTypeStaticText(LPSS_CELLTYPE lpCellType, long TextStyle);

Parameters

The following parameters are available.

Parameter Description
hWnd Window handle of the fpSpread control
lpCellType Pointer to structure to contain cell type information
TextStyle Text style
Use the (|) OR operator and combine the following values as indicated:
Constant Description
SS_TEXT_CENTER Horizontally centers text in cell
SS_TEXT_PREFIX Underlines text in cell when text is preceded by an ampersand (&)
SS_TEXT_SHADOW Draws cell with three-dimensional shadow effect
(This is the default style used for headers.)
SS_TEXT_SHADOWIN Adds shadow effect to cell
(The three-dimensional effect is projected in instead of out.)
SS_TEXT_VCENTER Vertically centers text in cell
SS_TEXT_WORDWRAP Allows words to wrap in cell
SSS_ELLIPSES Displays an ellipsis (...) when text is too long to fit in the cell
Use one of the following values:
SS_TEXT_LEFT Left-aligns text in cell
SS_TEXT_RIGHT Right-aligns text in cell
Use one of the following values:
SS_TEXT_TOP Top-aligns text in cell
SS_TEXT_BOTTOM Bottom-aligns text in cell
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
Use one of the following values:
SSS_TEXTORIENT_VERT_LTR Displays text vertically in the cell and wraps from left to right
SSS_TEXTORIENT_DOWN Rotates text 90 degrees (to "3 o'clock")
SSS_TEXTORIENT_UP Rotates text 270 degrees (to "9 o'clock")
SSS_TEXTORIENT_INVERT Rotates text 180 degrees (to "6 o'clock")
SSS_TEXTORIENT_VERT_RTL Displays text vertically in the cell and wraps from right to left

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 cell type structure to a static text type.

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.

Notes:
  • By default, text wraps in header cells and does not wrap in cells in the body of the sheet.
  • The SSSetTypeStaticText function provides similar settings for text alignment for the TextStyle parameter to provide backwards compatibility. For example, the values SS_TEXT_LEFT and SSS_ALIGN_LEFT both align text to the left in the cell. The control aligns the text according to the last alignment value provided for this parameter.

Return Value

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

See Also

Setting the Header Three-Dimensional Appearance
Creating Static Text (Label) Cells

SSSetCellType, SSSetCellTypeRange, SSSetSheet functions

ActiveX Correspondence

TypeTextPrefix, TypeTextShadow, TypeTextShadowIn, TypeTextWordWrap properties

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.