GrapeCity CalendarGrid for Windows Forms 2.0J
CalendarTitleButton クラス
メンバ  使用例 

GcCalendarGrid を移動できるカレンダータイトルボタンクラスを表します。
構文
Public Class CalendarTitleButton 
   Inherits CalendarTitleComponent
public class CalendarTitleButton : CalendarTitleComponent 
使用例
次のサンプルコードは、CalendarTitleButton の作成方法を示します。
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
継承階層

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         GrapeCity.Win.CalendarGrid.CalendarTitleComponent
            GrapeCity.Win.CalendarGrid.CalendarTitleButton

参照

CalendarTitleButton メンバ
GrapeCity.Win.CalendarGrid 名前空間

 

 


c 2008 GrapeCity inc. All rights reserved.