Spread Windows Forms 11.0 Product Documentation
LeadingZero Enumeration
Example Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.CellType Namespace : LeadingZero Enumeration
Specifies whether to display leading zeros in numeric cell types.
Syntax
'Declaration
 
Public Enum LeadingZero 
   Inherits System.Enum
'Usage
 
Dim instance As LeadingZero
public enum LeadingZero : System.Enum 
Members
MemberDescription
NoDoes not display leading zeros
UseRegionalDisplays leading zeros according to the Windows regional settings
YesDisplays leading zeros
Remarks

Do not use the UseRegional setting: it is intended for future use to display leading zeros according to the Windows regional settings, but this setting is not implemented at this time.

For those properties that use this setting as a default, the default value is instead 1 (No), which specifies that no leading zero is displayed.

Example
This example shows how to display the leading zero in a numeric cell.
FarPoint.Win.Spread.CellType.NumberCellType numct = new FarPoint.Win.Spread.CellType.NumberCellType();
numct.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes;
fpSpread1.ActiveSheet.Cells[0, 0].CellType = numct;
fpSpread1.ActiveSheet.Cells[0, 0].Value = 0.456;
Dim numct As New FarPoint.Win.Spread.CellType.NumberCellType()
numct.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes
fpSpread1.ActiveSheet.Cells(0, 0).CellType = numct
fpSpread1.ActiveSheet.Cells(0, 0).Value = 0.456
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         FarPoint.Win.Spread.CellType.LeadingZero

See Also

Reference

FarPoint.Win.Spread.CellType Namespace
LeadingZero Property (NumberCellType Class)
LeadingZero Property (PercentCellType Class)
LeadingZero Property (CurrencyCellType Class)

User-Task Documentation

Setting a Number Cell
Setting a Percent Cell
Setting a Currency Cell