Spread Windows Forms 6.0 Product Documentation
PositiveFormat Property
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.CellType Namespace > CurrencyCellType Class : PositiveFormat Property


Glossary Item Box

Gets or sets the format for displaying a positive value.

Syntax

Visual Basic (Declaration) 
Public Property PositiveFormat As CurrencyPositiveFormat
Visual Basic (Usage)Copy Code
Dim instance As CurrencyCellType
Dim value As CurrencyPositiveFormat
 
instance.PositiveFormat = value
 
value = instance.PositiveFormat
C# 
public CurrencyPositiveFormat PositiveFormat {get; set;}

Property Value

CurrencyPositiveFormat setting that determines how positive currency values are displayed

Example

This example specifies a currency cell and sets the formatting using the various properties.
C#Copy Code
FarPoint.Win.Spread.CellType.CurrencyCellType currcell = new FarPoint.Win.Spread.CellType.CurrencyCellType();
currcell.CurrencySymbol = "CN$";
currcell.DecimalPlaces = 4;
currcell.DecimalSeparator = "#";
currcell.FixedPoint = true;
currcell.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes;
currcell.MaximumValue = 999999999999;
currcell.MinimumValue = 1;
currcell.NegativeFormat = FarPoint.Win.Spread.CellType.CurrencyNegativeFormat.SignSymbolSpaceBefore;
currcell.NegativeRed = true;
currcell.PositiveFormat = FarPoint.Win.Spread.CellType.CurrencyPositiveFormat.CurrencySymbolBefore;
currcell.Separator = ",";
currcell.ShowCurrencySymbol = true;
currcell.ShowSeparator = true;
fpSpread1.Sheets[0].Cells[5,2].CellType = currcell;
fpSpread1.Sheets[0].Cells[5,2].Value = 321.98;
Visual BasicCopy Code
Dim currcell As New FarPoint.Win.Spread.CellType.CurrencyCellType()
currcell.CurrencySymbol = "CN$"
currcell.DecimalPlaces = 4
currcell.DecimalSeparator = "#"
currcell.FixedPoint = True
currcell.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes
currcell.MaximumValue = 999999999999
currcell.MinimumValue = 1
currcell.NegativeFormat = FarPoint.Win.Spread.CellType.CurrencyNegativeFormat.SignSymbolSpaceBefore
currcell.NegativeRed = true
currcell.PositiveFormat = FarPoint.Win.Spread.CellType.CurrencyPositiveFormat.CurrencySymbolBefore
currcell.Separator = ","
currcell.ShowCurrencySymbol = True
currcell.ShowSeparator = True
FpSpread1.Sheets(0).Cells(5, 2).CellType = currcell
FpSpread1.Sheets(0).Cells(5, 2).Value = 443.3482

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

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