Spread Windows Forms 13.0 Product Documentation
FarPoint.Win.Spread Assembly / FarPoint.Win.Spread.CellType Namespace / FractionDenominatorPrecision Enumeration
Example Example

In This Topic
    FractionDenominatorPrecision Enumeration
    In This Topic
    Specifies the precision of the fraction denominator for numeric cells that display as fractions.
    Public Enum FractionDenominatorPrecision 
       Inherits System.Enum
    Dim instance As FractionDenominatorPrecision
    public enum FractionDenominatorPrecision : System.Enum 
    Auto Sets the precision automatically.
    Custom Sets the precision to a custom value.
    Eighths Sets the precision to eighths.
    Halves Sets the precision to halves.
    Hundredths Sets the precision to hundredths.
    Quarters Sets the precision to quarters.
    Sixteenths Sets the precision to sixteenths.
    SixtyFourths Sets the precision to sixty-fourths.
    Tenths Sets the precision to tenths.
    ThirtySeconds Sets the precision to thirty-seconds.
    Thousandths Sets the precision to thousandths.
    This example creates a number cell.
    FarPoint.Win.Spread.CellType.NumberCellType n = new FarPoint.Win.Spread.CellType.NumberCellType();
    n.FractionMode = true;            
    n.DecimalPlaces = 2;
    n.FractionDenominatorDigits = 2;
    n.FractionCustomFormat = "# ??/??";
    n.FractionRenderOnly = true;
    n.FractionDenominatorPrecision = FarPoint.Win.Spread.CellType.FractionDenominatorPrecision.Hundredths;
    fpSpread1.ActiveSheet.Cells[0, 0].CellType = n;
    fpSpread1.ActiveSheet.Cells[0, 0].Value = 5.004;
    Dim n As New FarPoint.Win.Spread.CellType.NumberCellType()
    n.FractionMode = True        
    n.DecimalPlaces = 2
    n.FractionDenominatorDigits = 2
    n.FractionCustomFormat = "# ??/??"
    n.FractionRenderOnly = True
    n.FractionDenominatorPrecision = FarPoint.Win.Spread.CellType.FractionDenominatorPrecision.Hundredths
    fpSpread1.ActiveSheet.Cells(0, 0).CellType = n
    fpSpread1.ActiveSheet.Cells(0, 0).Value = 5.004
    Inheritance Hierarchy


    See Also