GrapeCity CalendarGrid for Windows Forms 2.0J
Fields プロパティ (CalendarGcDateTimeCellType)
使用例 

CalendarGcDateTimeCellType のフィールドを取得します。
構文
Public ReadOnly Property Fields As DateTimeFieldCollection
public DateTimeFieldCollection Fields {get;}

プロパティ値

CalendarGcDateTimeCellType 内の項目を表す DateTimeFieldCollection
使用例
次のサンプルコードは、このプロパティにフィールドを追加する方法を示します。このサンプルコードは、CalendarGcDateTimeCellType に示されている詳細なコード例の一部を抜粋したものです。
private void SetGcDateCellFields(CalendarGcDateTimeCellType gcDateCell)
{
    gcDateCell.Fields.Clear();

    DateYearField fields0 = new DateYearField();
    DateLiteralField fields1 = new DateLiteralField();
    DateMonthField fields2 = new DateMonthField();
    DateLiteralField fields3 = new DateLiteralField();
    DateDayField fields4 = new DateDayField();
    DateLiteralField fields5 = new DateLiteralField();
    DateHourField fields6 = new DateHourField();
    DateLiteralField fields7 = new DateLiteralField();
    DateMinuteField fields8 = new DateMinuteField();
    DateLiteralField fields9 = new DateLiteralField();
    DateSecondField fields10 = new DateSecondField();
    fields1.Text = "/";
    fields3.Text = "/";
    fields7.Text = ":";
    fields9.Text = ":";
    gcDateCell.Fields.AddRange(new DateField[]{
        fields0,fields1,fields2,fields3,fields4,fields5,fields6,fields7,fields8,fields9,fields10,
    });
}
Private Sub SetGcDateCellFields(gcDateCell As CalendarGcDateTimeCellType)
    gcDateCell.Fields.Clear()

    Dim fields0 As New DateYearField()
    Dim fields1 As New DateLiteralField()
    Dim fields2 As New DateMonthField()
    Dim fields3 As New DateLiteralField()
    Dim fields4 As New DateDayField()
    Dim fields5 As New DateLiteralField()
    Dim fields6 As New DateHourField()
    Dim fields7 As New DateLiteralField()
    Dim fields8 As New DateMinuteField()
    Dim fields9 As New DateLiteralField()
    Dim fields10 As New DateSecondField()
    fields1.Text = "/"
    fields3.Text = "/"
    fields7.Text = ":"
    fields9.Text = ":"
    gcDateCell.Fields.AddRange(New DateField() {fields0, fields1, fields2, fields3, fields4, fields5, _
        fields6, fields7, fields8, fields9, fields10})
End Sub
参照

CalendarGcDateTimeCellType クラス
CalendarGcDateTimeCellType メンバ

 

 


c 2008 GrapeCity inc. All rights reserved.