MESCIUS SPREAD for Windows Forms 15.0J
LeadingZero プロパティ (CurrencyCellType)
使用例 

先頭のゼロを表示するかどうかを表す値を取得または設定します。
構文
'宣言
 
Public Property LeadingZero As LeadingZero
public LeadingZero LeadingZero {get; set;}

プロパティ値

先頭のゼロの表示を決定するLeadingZero設定
使用例
次のサンプルコードは、通貨型セルを指定し、各種プロパティを使用して書式を設定します。
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 メンバ
LeadingZero 列挙体

 

 


© MESCIUS inc. All rights reserved.