Spread Windows Forms 7.0 Product Documentation
NegativeFormat Enumeration
Example  See Also  Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.CellType Namespace : NegativeFormat Enumeration


Glossary Item Box

Specifies the display of the negative sign in the cell contents.

Syntax

Visual Basic (Declaration) 
Public Enum NegativeFormat 
   Inherits System.Enum
Visual Basic (Usage)Copy Code
Dim instance As NegativeFormat
C# 
public enum NegativeFormat : System.Enum 

Members

MemberDescription
NegativeSignAfterDisplays the negative sign (to the right) after the value, as in 1-
NegativeSignAfterWithSpaceDisplays the negative sign with a space (to the right) after the value, as in 1 -
NegativeSignBeforeDisplays the negative sign (to the left) before the value, as in -1
NegativeSignBeforeWithSpaceDisplays 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.
C#Copy Code
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;
Visual BasicCopy Code
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

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.