PowerTools MultiRow for Windows Forms 8.0J
DisplayFields プロパティ (GcDateTimeCell)
使用例 

GcDateTimeCellの表示フィールドを取得します。
構文
Public ReadOnly Property DisplayFields As DateTimeDisplayFieldCollection
public DateTimeDisplayFieldCollection DisplayFields {get;}

プロパティ値

表示フィールドのコレクションを示すGrapeCity.Win.MultiRow.InputMan.DateDisplayFieldCollectionオブジェクト。
使用例
以下のサンプルコードは、表示書式の追加方法の使用例です。このコードは GcDateTimeCell のサンプルコードの一部です。
private void SetGcDateTimeCellDisplayFields(GcDateTimeCell gcDateTimeCell1)
{
    gcDateTimeCell1.DisplayFields.Clear();

    DateYearDisplayField dateYearDisplayField1 = new DateYearDisplayField();
    DateLiteralDisplayField dateLiteralDisplayField2 = new DateLiteralDisplayField();
    DateMonthDisplayField dateMonthDisplayField1 = new DateMonthDisplayField();
    DateLiteralDisplayField dateLiteralDisplayField3 = new DateLiteralDisplayField();
    DateDayDisplayField dateDayDisplayField1 = new DateDayDisplayField();
    DateLiteralDisplayField dateLiteralDisplayField4 = new DateLiteralDisplayField();
    DateLiteralDisplayField dateLiteralDisplayField5 = new DateLiteralDisplayField();
    DateHourDisplayField dateHourDisplayField6 = new DateHourDisplayField();
    DateLiteralDisplayField dateLiteralDisplayField7 = new DateLiteralDisplayField();
    DateMinuteDisplayField dateMinuteDisplayField8 = new DateMinuteDisplayField();
    DateLiteralDisplayField dateLiteralDisplayField9 = new DateLiteralDisplayField();
    DateSecondDisplayField dateSecondDisplayField10 = new DateSecondDisplayField();

    dateLiteralDisplayField2.Text = "年";
    dateLiteralDisplayField3.Text = "月";
    dateLiteralDisplayField4.Text = "日";
    dateLiteralDisplayField7.Text = ":";
    dateLiteralDisplayField9.Text = ":";

    gcDateTimeCell1.DisplayFields.AddRange(new DateDisplayField[] {
    dateYearDisplayField1,dateLiteralDisplayField2,dateMonthDisplayField1,dateLiteralDisplayField3,dateDayDisplayField1,dateLiteralDisplayField4,
    dateLiteralDisplayField5,dateHourDisplayField6,dateLiteralDisplayField7,dateMinuteDisplayField8,dateLiteralDisplayField9,dateSecondDisplayField10});
}
Private Sub SetGcDateTimeCellDisplayFields(ByVal gcDateTimeCell1 As GcDateTimeCell)
    gcDateTimeCell1.DisplayFields.Clear()

    Dim dateYearDisplayField1 As New DateYearDisplayField()
    Dim dateLiteralDisplayField2 As New DateLiteralDisplayField()
    Dim dateMonthDisplayField1 As New DateMonthDisplayField()
    Dim dateLiteralDisplayField3 As New DateLiteralDisplayField()
    Dim dateDayDisplayField1 As New DateDayDisplayField()
    Dim dateLiteralDisplayField4 As New DateLiteralDisplayField()
    Dim dateLiteralDisplayField5 As New DateLiteralDisplayField()
    Dim dateHourDisplayField6 As New DateHourDisplayField()
    Dim dateLiteralDisplayField7 As New DateLiteralDisplayField()
    Dim dateMinuteDisplayField8 As New DateMinuteDisplayField()
    Dim dateLiteralDisplayField9 As New DateLiteralDisplayField()
    Dim dateSecondDisplayField10 As New DateSecondDisplayField()

    dateLiteralDisplayField2.Text = "年"
    dateLiteralDisplayField3.Text = "月"
    dateLiteralDisplayField4.Text = "日"
    dateLiteralDisplayField7.Text = ":"
    dateLiteralDisplayField9.Text = ":"

    gcDateTimeCell1.DisplayFields.AddRange(New DateDisplayField() {dateYearDisplayField1, dateLiteralDisplayField2, dateMonthDisplayField1, dateLiteralDisplayField3, dateDayDisplayField1, dateLiteralDisplayField4, _
     dateLiteralDisplayField5, dateHourDisplayField6, dateLiteralDisplayField7, dateMinuteDisplayField8, dateLiteralDisplayField9, dateSecondDisplayField10})
End Sub
参照

GcDateTimeCell クラス
GcDateTimeCell メンバ

 

 


© 2008-2015 GrapeCity inc. All rights reserved.