MESCIUS SPREAD for Windows Forms 15.0J
ThreeColorScaleConditionalFormattingRule コンストラクタ(ConditionalFormattingColorValue,ConditionalFormattingColorValue,ConditionalFormattingColorValue,Boolean)
使用例 

最小値。注意: 最小値は、そのTypeプロパティがMin、Number、Percent、Formula、PecentileのいずれかであるConditionalFormattingColorValueオブジェクトのみを受け入れます。
中間値。注意: 中間値は、そのTypeプロパティがNumber、Percent、Formula、PecentileのいずれかであるConditionalFormattingColorValueオブジェクトのみを受け入れます。
最大値。注意: 最大値は、そのTypeプロパティがMax、Number、Percent、Formula、PecentileのいずれかであるConditionalFormattingColorValueオブジェクトのみを受け入れます。
カスタム名によって参照された式が制限されないようにする場合はtrue、それ以外の場合はfalse
ThreeColorScaleConditionalFormattingRule クラスの新しいインスタンスを初期化します。
構文

パラメータ

minValue
最小値。注意: 最小値は、そのTypeプロパティがMin、Number、Percent、Formula、PecentileのいずれかであるConditionalFormattingColorValueオブジェクトのみを受け入れます。
midValue
中間値。注意: 中間値は、そのTypeプロパティがNumber、Percent、Formula、PecentileのいずれかであるConditionalFormattingColorValueオブジェクトのみを受け入れます。
maxValue
最大値。注意: 最大値は、そのTypeプロパティがMax、Number、Percent、Formula、PecentileのいずれかであるConditionalFormattingColorValueオブジェクトのみを受け入れます。
suppressCustomName
カスタム名によって参照された式が制限されないようにする場合はtrue、それ以外の場合はfalse
使用例
次のサンプルコードは、カラースケールルールを作成します。
fpSpread1.Sheets[0].Cells[0, 0].Value = 30;
fpSpread1.Sheets[0].Cells[1, 0].Value = 20;
fpSpread1.Sheets[0].Cells[1, 1].Value = 10;
fpSpread1.Sheets[0].Cells[0, 2].Value = 15;
FarPoint.Win.Spread.Model.CellRange celRange1 = new FarPoint.Win.Spread.Model.CellRange(0, 0, 3, 3);
FarPoint.Win.Spread.ThreeColorScaleConditionalFormattingRule rule = new FarPoint.Win.Spread.ThreeColorScaleConditionalFormattingRule(new FarPoint.Win.Spread.ConditionalFormattingColorValue(Color.Aqua, 10, FarPoint.Win.Spread.ConditionalFormattingValueType.Number), new FarPoint.Win.Spread.ConditionalFormattingColorValue(Color.BlueViolet, 20, FarPoint.Win.Spread.ConditionalFormattingValueType.Number), new FarPoint.Win.Spread.ConditionalFormattingColorValue(Color.Green, 50, FarPoint.Win.Spread.ConditionalFormattingValueType.Number), false);
fpSpread1.Sheets[0].SetConditionalFormatting(new FarPoint.Win.Spread.Model.CellRange[] { celRange1 }, rule);
fpSpread1.Sheets(0).Cells(0, 0).Value = 30
fpSpread1.Sheets(0).Cells(1, 0).Value = 20
fpSpread1.Sheets(0).Cells(1, 1).Value = 10
fpSpread1.Sheets(0).Cells(0, 2).Value = 15
Dim celRange1 As New FarPoint.Win.Spread.Model.CellRange(0, 0, 3, 3)
Dim Rule As New FarPoint.Win.Spread.ThreeColorScaleConditionalFormattingRule(New FarPoint.Win.Spread.ConditionalFormattingColorValue(Color.Aqua, 10, FarPoint.Win.Spread.ConditionalFormattingValueType.Number), New FarPoint.Win.Spread.ConditionalFormattingColorValue(Color.BlueViolet, 20, FarPoint.Win.Spread.ConditionalFormattingValueType.Number), New FarPoint.Win.Spread.ConditionalFormattingColorValue(Color.Green, 50, FarPoint.Win.Spread.ConditionalFormattingValueType.Number), False)
fpSpread1.Sheets(0).SetConditionalFormatting(New FarPoint.Win.Spread.Model.CellRange() {celRange1}, Rule)
参照

ThreeColorScaleConditionalFormattingRule クラス
ThreeColorScaleConditionalFormattingRule メンバ
オーバーロード一覧

 

 


© MESCIUS inc. All rights reserved.