Spread 8.0 Documentation
TypeHAlign Property
Support Options
ActiveX Reference > ActiveX Properties > TypeHAlign Property

Glossary Item Box

TypeHAlign Property


See Also    DLL    Example

Applies To

fpSpread control

Description

Sets or returns the horizontal alignment of the data in a cell. This property is available at run time only.

Syntax

C++

long CSpreadSheet::GetTypeHAlign( );
void CSpreadSheet::SetTypeHAlign(long value);

Visual Basic

[form.]fpSpread.TypeHAlign[ = setting%]

Remarks

The following settings are available:

Setting Description Constant
0 - Left Left aligns text TypeHAlignLeft
1 - Right Right aligns text TypeHAlignRight
2 - Center Centers text TypeHAlignCenter

Use the TypeHAlign property to specify the horizontal alignment in button, check box, combo box, currency, date, edit, number, percent, PIC, picture, scientific, static text, and time cells. For combo box cells, the setting of the TypeHAlign property sets the horizontal alignment in the edit field portion of the cell. To set the alignment in the drop-down list portion of the cell, use the TypeComboBoxWidth property.

The cell types have the following default values:

Cell type Default setting
Check box 0 (Left)
Combo box 0 (Left)
Currency 1 (Right)
Date 0 (Left)
Edit 0 (Left)
Number 1 (Right)
Percent 1 (Right)
PIC 0 (Left)
Picture 0 (Left)
Scientific 1 (Right)
Static text 0 (Left)
Time 0 (Left)

To use the TypeHAlign 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. Once you set the TypeHAlign property for a currency, number, or percent cell or cells, any subsequent currency, number, or percent cells you create will use the same TypeHAlign setting unless you reset it for those cells.

The TypeHAlign property does not have an effect if the CellType property is set 11 (Owner-Drawn) for the specified cell or cells. For button cells use the TypeButtonAlign property to set the location of the text in relation to the picture in the cell.

Use the TypeVAlign property to set the vertical alignment in a cell, except owner-drawn cells.

Spread Designer

Choose the Cell menu, the Cell Type menu, and then one of the following menus: Check Box, Combo Box, Currency, Date, Edit, Number, Percent, Label(Static), Mask(Pic), Picture, Scientific, or Time. Select an option under the Horizontal Alignment group box in the Cell Type Settings dialog box.

Data Type

Integer (Enumerated)

See Also

Allowing Cells to Overflow
Creating a Check Box Cell and Setting Its Type
Creating and Setting up a Combo Box Cell
Creating and Customizing a Currency Cell
Creating and Setting up a Date Cell
Creating and Customizing an Edit Cell
Creating and Customizing a Number Cell
Creating and Customizing Percent Cells
Creating Mask (PIC) Cells
Creating Picture Cells
Creating and Customizing a Static Text Cell
Creating and Customizing a Time Cell

CellType, Sheet, TypeButtonAlign, TypeCheckCenter, TypeCheckTextAlign, TypeComboBoxWidth, TypeVAlign, TypePictCenter properties

DLL Correspondence

SSSetTypeCheckBox, SSSetTypeComboBox, SSSetTypeDate, SSSetTypeEdit, SSSetTypeCurrency, SSSetTypeCurrencyEx, SSSetTypeNumber, SSSetTypeNumberEx, SSSetTypeOwnerDraw, SSSetTypePercent, SSSetTypePercentEx, SSSetTypePic, SSSetTypePicture, SSSetTypeStaticText, SSSetTypeTime functions

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