TypePercentLeadingZero Property
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
long CSpreadSheet::GetTypePercentLeadingZero( );
void CSpreadSheet::SetTypePercentLeadingZero(long value);
[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:
|
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