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

Glossary Item Box

TypePercentLeadingZero Property


See Also    DLL    Example

Applies To

fpSpread control

Description

Sets or returns whether a leading zero displays in a percent cell. This property is available at run time only.

Syntax

C++

long CSpreadSheet::GetTypePercentLeadingZero( );
void CSpreadSheet::SetTypePercentLeadingZero(long value);

Visual Basic

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

Remarks

When the TypePercentLeadingZero property is set to 1 (Yes), percent cells display a leading zero for values less than 1.0 and greater than –1.0, for example, "0.21".

The following settings are available:

Setting Description Constants
0 - Intl (Default) Uses the regional setting for Number Format in the Windows Control Panel TypeLeadingZeroIntl
0 - No (Default) Removes the leading zero TypeLeadingZeroNo
1 - Yes Displays the leading zero TypeLeadingZeroYes

Notes:
  • The value zero always displays a leading zero.
  • The control does not recognize changes made to the Windows regional settings or options until you restart your development environment or your application (or perform any operation that unloads and reloads the current control files). For more information about regional settings or options and Windows operating environments, see Variations in Windows Regional Settings or Options.

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

The TypePercentLeadingZero property does not have an effect unless the CellType property is set to 14 (Percent) for the specified cell or cells.

Spread Designer

Choose the Cell menu, the Cell Type menu, the Percent menu, and then the Settings tab, and then select an item in the Leading Zero drop-down list box in the Cell Type Settings dialog box.

Data Type

Integer (Enumerated)

See Also

Variations in Windows Regional Settings or Options
Formatting a Percent Cell

CellType, Sheet, TypePercentDecimal, TypePercentDecPlaces, TypePercentMax, TypePercentMin, TypePercentNegStyle properties

DLL Correspondence

SSSetTypePercentEx function

Copyright © GrapeCity, inc. All rights reserved.