MESCIUS SPREAD for Windows Forms 15.0J
ClearConditionalFormats メソッド (SheetView)
使用例 

セルの行インデックス
セルの列インデックス
指定した行と列にあるセルからすべての条件付き書式を削除します。
構文
'宣言
 
Public Sub ClearConditionalFormats( _
   ByVal row As Integer, _
   ByVal column As Integer _
) 
public void ClearConditionalFormats( 
   int row,
   int column
)

パラメータ

row
セルの行インデックス
column
セルの列インデックス
解説
このメソッドは非推奨になりました。
使用例
次のサンプルコードは、指定したセルの条件書式をクリアします。
FarPoint.Win.Spread.NamedStyle styleCold = new FarPoint.Win.Spread.NamedStyle(); 
FarPoint.Win.Spread.NamedStyle styleCool = new FarPoint.Win.Spread.NamedStyle(); 
FarPoint.Win.Spread.NamedStyle styleMild = new FarPoint.Win.Spread.NamedStyle(); 
FarPoint.Win.Spread.NamedStyle styleWarm = new FarPoint.Win.Spread.NamedStyle(); 
FarPoint.Win.Spread.NamedStyle styleHot = new FarPoint.Win.Spread.NamedStyle(); 
styleCold.BackColor = Color.Blue; 
styleCold.ForeColor = Color.White; 
styleCool.BackColor = Color.Cyan; 
styleMild.BackColor = Color.Lime; 
styleWarm.BackColor = Color.Yellow; 
styleHot.BackColor = Color.Red; 
fpSpread1.ActiveSheet.SetConditionalFormat(1, 1, styleCold, FarPoint.Win.Spread.ComparisonOperator.LessThan, "32"); 
fpSpread1.ActiveSheet.SetConditionalFormat(1, 1, styleCool, FarPoint.Win.Spread.ComparisonOperator.Between, "32", "55"); 
fpSpread1.ActiveSheet.SetConditionalFormat(1, 1, styleMild, FarPoint.Win.Spread.ComparisonOperator.Between, "55", "75"); 
fpSpread1.ActiveSheet.SetConditionalFormat(1, 1, styleWarm, FarPoint.Win.Spread.ComparisonOperator.Between, "75", "85"); 
fpSpread1.ActiveSheet.SetConditionalFormat(1, 1, styleHot, FarPoint.Win.Spread.ComparisonOperator.GreaterThan, "85"); 

private void button1_Click(object sender, System.EventArgs e)
{
fpSpread1.ActiveSheet.ClearConditionalFormats(1, 1);
fpSpread1.Refresh();
}
Dim styleCold As New FarPoint.Win.Spread.NamedStyle
Dim styleCool As New FarPoint.Win.Spread.NamedStyle
Dim styleMild As New FarPoint.Win.Spread.NamedStyle
Dim styleWarm As New FarPoint.Win.Spread.NamedStyle
Dim styleHot As New FarPoint.Win.Spread.NamedStyle
styleCold.BackColor = Color.Blue
styleCold.ForeColor = Color.White
styleCool.BackColor = Color.Cyan
styleMild.BackColor = Color.Lime
styleWarm.BackColor = Color.Yellow
styleHot.BackColor = Color.Red
Dim co As New FarPoint.Win.Spread.ComparisonOperator
FpSpread1.ActiveSheet.SetConditionalFormat(1, 1, styleCold, co.LessThan,"32")
FpSpread1.ActiveSheet.SetConditionalFormat(1, 1, styleCool, co.Between, "32", "55")
FpSpread1.ActiveSheet.SetConditionalFormat(1, 1, styleMild, co.Between, "55", "75")
FpSpread1.ActiveSheet.SetConditionalFormat(1, 1, styleWarm, co.Between, "75", "85")
FpSpread1.ActiveSheet.SetConditionalFormat(1, 1, styleHot, co.GreaterThan,"85")

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
FpSpread1.ActiveSheet.ClearConditionalFormats(1, 1)
FpSpread1.Refresh()
End Sub
参照

SheetView クラス
SheetView メンバ

開発者ガイド

セルの条件付き書式の設定

 

 


© MESCIUS inc. All rights reserved.