MESCIUS SPREAD for ASP.NET 10.0J
UnaryComparisonConditionalFormattingRule コンストラクタ(UnaryComparisonOperator,String,Boolean)

@演算子。
文字列値。
テキストが数式かどうかを示すブール値。
UnaryComparisonConditionalFormattingRuleクラスの新しいインスタンスを初期化します。
構文
'Declaration
 
Public Function New( _
   ByVal operator As UnaryComparisonOperator, _
   ByVal text As String, _
   ByVal isFormula As Boolean _
)
public UnaryComparisonConditionalFormattingRule( 
   UnaryComparisonOperator operator,
   string text,
   bool isFormula
)

パラメータ

operator
@演算子。
text
文字列値。
isFormula
テキストが数式かどうかを示すブール値。
次のサンプルコードは、数式を使用してルールの値を評価します。
protected void Page_Load(object sender, EventArgs e)
{
    if (this.IsPostBack) return;
    FpSpread1.Sheets[0].Cells[0, 0].Value = 3;
    FpSpread1.Sheets[0].Cells[1, 0].Value = 2;
    FpSpread1.Sheets[0].Cells[1, 1].Value = 4;
    FpSpread1.Sheets[0].Cells[0, 1].Value = 1;
    
    //Unary comparison CF
    FarPoint.Web.Spread.UnaryComparisonConditionalFormattingRule unary = new FarPoint.Web.Spread.UnaryComparisonConditionalFormattingRule(FarPoint.Web.Spread.UnaryComparisonOperator.EqualTo, "=A1+B1", true);
    unary.Formula = "=A1+B1";
    unary.BackColor = System.Drawing.Color.Red;
    unary.FontStyle = new FarPoint.Web.Spread.SpreadFontStyle(FarPoint.Web.Spread.UnderlineFontStyle.None);
    unary.FontStyle.RegularBoldItalic = FarPoint.Web.Spread.RegularBoldItalicFontStyle.Bold;
    FpSpread1.ActiveSheetView.SetConditionalFormatting(1, 1, unary);      
}
Protected Sub Page_Load(sender As Object, e As EventArgs)
    If Me.IsPostBack Then
       Return
    End If
    FpSpread1.Sheets(0).Cells(0, 0).Value = 3
    FpSpread1.Sheets(0).Cells(1, 0).Value = 2
    FpSpread1.Sheets(0).Cells(1, 1).Value = 4
    FpSpread1.Sheets(0).Cells(0, 1).Value = 1
    
    'Unary comparison CF
    Dim unary As New FarPoint.Web.Spread.UnaryComparisonConditionalFormattingRule(FarPoint.Web.Spread.UnaryComparisonOperator.EqualTo, "=A1+B1", True)
    unary.Formula = "=A1+B1"
    unary.BackColor = System.Drawing.Color.Red
    unary.FontStyle = New FarPoint.Web.Spread.SpreadFontStyle(FarPoint.Web.Spread.UnderlineFontStyle.None)
    unary.FontStyle.RegularBoldItalic = FarPoint.Web.Spread.RegularBoldItalicFontStyle.Bold
    FpSpread1.ActiveSheetView.SetConditionalFormatting(1, 1, unary)
End Sub
参照

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

 

 


© MESCIUS inc. All rights reserved.