Spread Windows Forms 13.0 Product Documentation
FarPoint.Win.Spread Assembly / FarPoint.Win.Spread.CellType Namespace / NumberCellType Class / FractionRenderOnly Property
Example


In This Topic
    FractionRenderOnly Property
    In This Topic
    Gets or sets whether to allow fractions in edit mode when values are displayed as fractions.
    Syntax
    'Declaration
     
    Public Overridable Property FractionRenderOnly As Boolean
    'Usage
     
    Dim instance As NumberCellType
    Dim value As Boolean
     
    instance.FractionRenderOnly = value
     
    value = instance.FractionRenderOnly
    public virtual bool FractionRenderOnly {get; set;}

    Property Value

    Boolean: true to allow fractions in edit mode; false otherwise
    Example
    This example sets the FractionRenderOnly property.
    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
    See Also