PowerTools CalendarGrid for Windows Forms 1.0J
Children プロパティ
使用例 

CalendarTitle に追加された要素を表す CalendarTitleComponentCollection を取得します。
構文
Public ReadOnly Property Children As CalendarTitleComponentCollection
public CalendarTitleComponentCollection Children {get;}
使用例
次のサンプルコードは、CalendarTitleComponentCollectionCalendarTitleButton を追加する方法を示します。
private void AddTitleButton()
{
    CalendarTitleButton previousButton = new CalendarTitleButton();
    previousButton.ButtonBehavior = GrapeCity.Win.CalendarGrid.CalendarTitleButtonBehavior.Previous;
    previousButton.Name = "calendarTitleButton4";
    previousButton.Text = "<<";
    previousButton.ToolTipText = "{0}";

    CalendarTitleButton nextButton = new CalendarTitleButton();
    nextButton.ButtonBehavior = GrapeCity.Win.CalendarGrid.CalendarTitleButtonBehavior.Next;
    nextButton.Name = "calendarTitleButton4";
    nextButton.Text = ">>";
    nextButton.ToolTipText = "{0}";

    CalendarTitleButton gotoDateButton = new CalendarTitleButton();
    gotoDateButton.BackColor = System.Drawing.Color.AliceBlue;
    gotoDateButton.ButtonBehavior = GrapeCity.Win.CalendarGrid.CalendarTitleButtonBehavior.GotoDate;
    gotoDateButton.DateFormat = "{MonthDay}";
    gotoDateButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
    gotoDateButton.GotoDate = new System.DateTime(2014, 2, 14, 0, 0, 0, 0);
    gotoDateButton.Name = "calendarTitleButton5";
    gotoDateButton.Text = "{0}";
    gotoDateButton.ToolTipText = "{0}";

    this.gcCalendarGrid1.TitleHeader.Children.Add(previousButton);
    this.gcCalendarGrid1.TitleHeader.Children.Add(nextButton);
    this.gcCalendarGrid1.TitleHeader.Children.Add(gotoDateButton);
}
Private Sub AddTitleButton()
    Dim previousButton As New CalendarTitleButton()
    previousButton.ButtonBehavior = GrapeCity.Win.CalendarGrid.CalendarTitleButtonBehavior.Previous
    previousButton.Name = "calendarTitleButton4"
    previousButton.Text = "<<"
    previousButton.ToolTipText = "{0}"

    Dim nextButton As New CalendarTitleButton()
    nextButton.ButtonBehavior = GrapeCity.Win.CalendarGrid.CalendarTitleButtonBehavior.[Next]
    nextButton.Name = "calendarTitleButton4"
    nextButton.Text = ">>"
    nextButton.ToolTipText = "{0}"

    Dim gotoDateButton As New CalendarTitleButton()
    gotoDateButton.BackColor = System.Drawing.Color.AliceBlue
    gotoDateButton.ButtonBehavior = GrapeCity.Win.CalendarGrid.CalendarTitleButtonBehavior.GotoDate
    gotoDateButton.DateFormat = "{MonthDay}"
    gotoDateButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat
    gotoDateButton.GotoDate = New System.DateTime(2014, 2, 14, 0, 0, 0, _
        0)
    gotoDateButton.Name = "calendarTitleButton5"
    gotoDateButton.Text = "{0}"
    gotoDateButton.ToolTipText = "{0}"

    Me.gcCalendarGrid1.TitleHeader.Children.Add(previousButton)
    Me.gcCalendarGrid1.TitleHeader.Children.Add(nextButton)
    Me.gcCalendarGrid1.TitleHeader.Children.Add(gotoDateButton)
End Sub
参照

CalendarTitle クラス
CalendarTitle メンバ

 

 


© 2014 GrapeCity inc. All rights reserved.