PowerTools SPREAD for Windows Forms 10.0J
SpinDecimalIncrement プロパティ (PercentCellType)


スピンボタンを使用したときに値を増分する量を設定します (カーソルが小数部分にある場合)。
構文
'Declaration
 
Public Property SpinDecimalIncrement As Single
'使用法
 
Dim instance As PercentCellType
Dim value As Single
 
instance.SpinDecimalIncrement = value
 
value = instance.SpinDecimalIncrement
public float SpinDecimalIncrement {get; set;}

プロパティ値

増分量を表す浮動小数点数
解説

この増分量は、カーソルが小数点区切り記号の右側にあり、値が1未満に制限されていない場合に適用されます。

次のサンプルコードは、パーセントで書式設定された数値型セルを作成し、各種書式プロパティを設定します。
FarPoint.Win.Spread.CellType.PercentCellType prctcell = new FarPoint.Win.Spread.CellType.PercentCellType();
prctcell.DecimalPlaces = 3;
prctcell.DecimalSeparator = ",";
prctcell.FixedPoint = true;
prctcell.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.UseRegional;
prctcell.MaximumValue = 50000.0;
prctcell.MinimumValue = -1000.0;
prctcell.NegativeFormat = FarPoint.Win.Spread.CellType.PercentNegativeFormat.PercentAfterWithSpace;
prctcell.NegativeRed = true;
prctcell.PercentSign = "%";
prctcell.PositiveFormat = FarPoint.Win.Spread.CellType.PercentPositiveFormat.PercentAfter;
prctcell.Separator = "/";
prctcell.ShowSeparator = true;
prctcell.SpinButton = true;
prctcell.SpinDecimalIncrement = 10;
prctcell.SpinIntegerIncrement = 5;
prctcell.SpinWrap = true;
fpSpread1.ActiveSheet.Cells[0, 0].CellType = prctcell;
fpSpread1.ActiveSheet.Cells[0, 0].Value = -443.0908;
Dim prctcell As New FarPoint.Win.Spread.CellType.PercentCellType()
prctcell.DecimalPlaces = 3
prctcell.DecimalSeparator = ","
prctcell.FixedPoint = True
prctcell.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.UseRegional
prctcell.MaximumValue = 50000.0
prctcell.MinimumValue = -1000.0
prctcell.NegativeFormat = FarPoint.Win.Spread.CellType.PercentNegativeFormat.PercentAfterWithSpace
prctcell.NegativeRed = True
prctcell.PercentSign = "%"
prctcell.PositiveFormat = FarPoint.Win.Spread.CellType.PercentPositiveFormat.PercentAfter
prctcell.Separator = "/"
prctcell.ShowSeparator = True
prctcell.SpinButton = True
prctcell.SpinDecimalIncrement = 10
prctcell.SpinIntegerIncrement = 5
prctcell.SpinWrap = True
FpSpread1.ActiveSheet.Cells(0, 0).CellType = prctcell
FpSpread1.ActiveSheet.Cells(0, 0).Value = -443.9098
参照

PercentCellType クラス
PercentCellType メンバ

開発者ガイド

スピン ボタンの表示

 

 


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