Spread 8.0 Documentation
SSGetColWidth, SSSetColWidth Functions
Support Options
DLL Reference > DLL Functions > SSGetColWidth, SSSetColWidth Functions

Glossary Item Box

SSGetColWidth, SSSetColWidth Functions


See Also    ActiveX

Applies To

fpSpread DLL control

Description

Set or return the width of the specified column.

Syntax

C

BOOL SSGetColWidth(HWND hWnd, SS_COORD Col, LPDOUBLE lpdfColWidth);

BOOL SSSetColWidth(HWND hWnd, SS_COORD Col, DOUBLE dfWidth);

C++

BOOL TSpread::GetColWidth(SS_COORD Col, LPDOUBLE lpColWidth);

BOOL TSpread::SetColWidth(SS_COORD Col, DOUBLE Width);

Parameters

The SSGetColWidth function has the following parameters:

Parameter Description
hWnd Window handle of the fpSpread control
Col Column number
lpdfColWidth Pointer to variable that receives the column width

The SSSetColWidth function has the following parameters:

Parameter Description
hWnd Window handle of the fpSpread control
Col Column number
(Value can be SS_ALLCOLS.)
dfWidth New column width

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.

The unit of measurement for the column width is based on the value of the SSSetUnitType function. The default unit of measurement is based on the width of one character of the system font.

Note: The value set or returned by the SSGetColWidth or SSSetColWidth function does not include the width of the adjacent grid line.

Return Value

TRUE if the function completes successfully; FALSE otherwise.

See Also

Resizing a Cell to Fit the Widest Data
Resizing Columns and Rows to Fit Text
Setting the Width of Columns

SSColWidthToLogUnits, SSGetColWidthInPixels, SSGetRowHeight, SSGetRowHeightInPixels, SSLogUnitsToColWidth, SSSetColWidthInPixels, SSSetRowHeight, SSSetRowHeightInPixels, SSSetSheet functions

ActiveX Correspondence

ColWidth property

Copyright © GrapeCity, inc. All rights reserved.