PowerTools SPREAD for Windows Forms 8.0J
DecimalPlaces プロパティ (CurrencyCellType)


小数点以下の桁数を取得または設定します。
構文
'Declaration
 
Public Property DecimalPlaces As Integer
'使用法
 
Dim instance As CurrencyCellType
Dim value As Integer
 
instance.DecimalPlaces = value
 
value = instance.DecimalPlaces
public int DecimalPlaces {get; set;}

プロパティ値

表示する小数点以下の桁数を表す Integer
解説

最大値は16です。

次のサンプルコードは、通貨型セルを指定し、各種プロパティを使用して書式を設定します。
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;
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
参照

CurrencyCellType クラス
CurrencyCellType メンバ

 

 


© 2004-2015, GrapeCity inc. All rights reserved.