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


In This Topic
    NegativeRed Property (NumberCellType)
    In This Topic
    Gets or sets whether negative numeric values are displayed in red.
    Syntax
    'Declaration
     
    Public Property NegativeRed As Boolean
    'Usage
     
    Dim instance As NumberCellType
    Dim value As Boolean
     
    instance.NegativeRed = value
     
    value = instance.NegativeRed
    public bool NegativeRed {get; set;}

    Property Value

    Boolean: true to display negative values in red; false otherwise
    Example
    This example sets several properties of a numeric format cell.
    FarPoint.Win.Spread.CellType.NumberCellType num = new FarPoint.Win.Spread.CellType.NumberCellType();
    num.DecimalPlaces = 3;
    num.DecimalSeparator = ",";
    num.FixedPoint = true;
    num.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.UseRegional;
    num.MaximumValue = 50000.0;
    num.MinimumValue = -1000.0;
    num.NegativeFormat = FarPoint.Win.Spread.CellType.NegativeFormat.Parentheses;
    num.NegativeRed = true;
    num.Separator = "/";
    num.ShowSeparator = true;
    num.SpinButton = true;
    num.SpinDecimalIncrement = 10;
    num.SpinIntegerIncrement = 5;
    num.SpinWrap = true;
    fpSpread1.ActiveSheet.Cells[0, 0].CellType = num;
    fpSpread1.ActiveSheet.Cells[0, 0].Value = -443.0908;
    Dim num As New FarPoint.Win.Spread.CellType.NumberCellType()
    num.DecimalPlaces = 3
    num.DecimalSeparator = ","
    num.FixedPoint = True
    num.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.UseRegional
    num.MaximumValue = 50000.0
    num.MinimumValue = -1000.0
    num.NegativeFormat = FarPoint.Win.Spread.CellType.NegativeFormat.Parentheses
    num.NegativeRed = True
    num.Separator = "/"
    num.ShowSeparator = True
    num.SpinButton = True
    num.SpinDecimalIncrement = 10
    num.SpinIntegerIncrement = 5
    num.SpinWrap = True
    FpSpread1.ActiveSheet.Cells(0, 0).CellType = num
    FpSpread1.ActiveSheet.Cells(0, 0).Value = 443.9098
    See Also