PowerTools SPREAD for Windows Forms 8.0J
UseNegativeColor プロパティ


GcNumber.NegativeColorを使用して負数を表示するかどうかを示す値を取得または設定します。
構文
'Declaration
 
Public Property UseNegativeColor As Boolean
'使用法
 
Dim instance As GcNumberCellType
Dim value As Boolean
 
instance.UseNegativeColor = value
 
value = instance.UseNegativeColor
public bool UseNegativeColor {get; set;}

プロパティ値

GcNumber.NegativeColorを使用して負数を表示する場合はtrueGcNumber.ForeColorを使用して負数を表示する場合はfalse
デフォルト値はtrueです。
解説
GrapeCity.Win.Valueプロパティがゼロ未満で、UseNegativeColorプロパティがtrueの場合は、このプロパティに従ってテキストの色が決定されます。
次のサンプルコードは、負数の色を設定します。
GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType ncell1 = new GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType();
ncell1.NegativeColor = Color.Red;
ncell1.UseNegativeColor = true;
fpSpread1.Sheets[0].Cells[1, 1].CellType = ncell1;
fpSpread1.Sheets[0].Cells[1, 1].Value = -1;
Dim ncell1 As New GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType()
ncell1.NegativeColor = Color.Red
ncell1.UseNegativeColor = True
FpSpread1.Sheets(0).Cells(1, 1).CellType = ncell1
FpSpread1.Sheets(0).Cells(1, 1).Value = -1
参照

GcNumberCellType クラス
GcNumberCellType メンバ

 

 


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