PowerTools SPREAD for Windows Forms 8.0J
TimePeriodConditionalFormattingRule コンストラクタ(TimePeriod)


期間。
TimePeriodConditionalFormattingRule クラスの新しいインスタンスを初期化します。
構文
'Declaration
 
Public Function New( _
   ByVal period As TimePeriod _
)
'使用法
 
Dim period As TimePeriod
 
Dim instance As New TimePeriodConditionalFormattingRule(period)
public TimePeriodConditionalFormattingRule( 
   TimePeriod period
)

パラメータ

period
期間。
次のサンプルコードは、条件付き規則を作成します。
private void Form1_Load(object sender, EventArgs e)
        {
            fpSpread1.Sheets[0].Cells[1, 1].Value = DateTime.Now;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            //Date Occurs CF
            FarPoint.Win.Spread.TimePeriodConditionalFormattingRule time = new FarPoint.Win.Spread.TimePeriodConditionalFormattingRule(FarPoint.Win.Spread.TimePeriod.Last7Days);
            time.TimePeriod = FarPoint.Win.Spread.TimePeriod.Last7Days;
            time.ForeColor = Color.Magenta;
            fpSpread1.ActiveSheet.SetConditionalFormatting(1, 1, time);
        }
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 
        FpSpread1.Sheets(0).Cells(1, 1).Value = Date.Now
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        'Date Occurs CF
        Dim time As New FarPoint.Win.Spread.TimePeriodConditionalFormattingRule(FarPoint.Win.Spread.TimePeriod.Last7Days)
        time.TimePeriod = FarPoint.Win.Spread.TimePeriod.Last7Days
        time.ForeColor = Color.DarkMagenta
        FpSpread1.ActiveSheet.SetConditionalFormatting(1, 1, time)
    End Sub
参照

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

 

 


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