PowerTools InputMan for Windows Forms 8.0J
ClickDateEventArgs クラス
メンバ  使用例 

ClickDate イベントのイベントデータを実装します。
構文
Public Class ClickDateEventArgs 
   Inherits System.EventArgs
public class ClickDateEventArgs : System.EventArgs 
使用例
//  Please use the following namespace
//  using System.Windows.Forms;
//  using GrapeCity.Win.Editors;

private GcTextBox gcTextBox1;
public void WireClickDateEvent()
{
    gcTextBox1 = new GcTextBox();
    GcDateTime GcDateTime1 = new GcDateTime();
    GcDateTime1.DropDownCalendar.ClickDate += new ClickDateEventHandler(OnDropDownCalendarClickDate);
}

private void OnDropDownCalendarClickDate(object sender, ClickDateEventArgs e)
{
    if (e.Date.HasValue)
    {
        // Gets the clicked DateTime value from e.Date property.                
        gcTextBox1.Text = e.Date.ToString();
    }
    else
    {
        // Sets the textbox's text property to string.Empty when the e.Date is null.
        gcTextBox1.Text = string.Empty;
    }
}
'  Please use the following namespace
'  Imports System.Windows.Forms;
'  Imports GrapeCity.Win.Editors;

Private gcTextBox1 As GcTextBox
Public Sub WireClickDateEvent()
    gcTextBox1 = New GcTextBox()
    Dim GcDateTime1 As New GcDateTime()
    AddHandler GcDateTime1.DropDownCalendar.ClickDate, AddressOf OnDropDownCalendarClickDate
End Sub

Private Sub OnDropDownCalendarClickDate(ByVal sender As Object, ByVal e As ClickDateEventArgs)
    If e.[Date].HasValue Then
        ' Gets the clicked DateTime value from e.Date property.
        gcTextBox1.Text = e.[Date].ToString()
    Else
        ' Sets the textbox's text property to string.Empty when the e.Date is null.
        gcTextBox1.Text = String.Empty
    End If
End Sub
継承階層

System.Object
   System.EventArgs
      GrapeCity.Win.Editors.ClickDateEventArgs

参照

ClickDateEventArgs メンバ
GrapeCity.Win.Editors 名前空間

 

 


© 2004-2015 GrapeCity inc. All rights reserved.