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


In This Topic
    NegativeFormat Enumeration
    In This Topic
    Specifies the display of the negative sign in the cell contents.
    Syntax
    'Declaration
     
    Public Enum NegativeFormat 
       Inherits System.Enum
    'Usage
     
    Dim instance As NegativeFormat
    public enum NegativeFormat : System.Enum 
    Members
    MemberDescription
    NegativeSignAfter Displays the negative sign (to the right) after the value, as in 1-
    NegativeSignAfterWithSpace Displays the negative sign with a space (to the right) after the value, as in 1 -
    NegativeSignBefore Displays the negative sign (to the left) before the value, as in -1
    NegativeSignBeforeWithSpace Displays the negative sign with a space (to the left) before the value, as in - 1
    Parentheses [0] Displays the value within parentheses, as in (1)
    UseRegional [-1] Displays the value according to the Windows regional settings
    Example
    This example specifies that the negative sign with a space before the value is displayed in a numeric cell with a negative value.
    FarPoint.Win.Spread.CellType.NumberCellType numct = new FarPoint.Win.Spread.CellType.NumberCellType();
    numct.NegativeFormat = FarPoint.Win.Spread.CellType.NegativeFormat.NegativeSignBeforeWithSpace;
    fpSpread1.ActiveSheet.Cells[0, 0].CellType = numct;
    fpSpread1.ActiveSheet.Cells[0, 0].Value = -50;
    Dim numct As New FarPoint.Win.Spread.CellType.NumberCellType()
    numct.NegativeFormat = FarPoint.Win.Spread.CellType.NegativeFormat.NegativeSignBeforeWithSpace
    fpSpread1.ActiveSheet.Cells(0, 0).CellType = numct
    fpSpread1.ActiveSheet.Cells(0, 0).Value = -50
    Inheritance Hierarchy

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

    See Also