PowerTools MultiRow for Windows Forms 8.0J
DropDownClosingEventArgs クラス
メンバ  使用例 

DropDownClosing イベントのイベントデータを格納します。
構文
Public Class DropDownClosingEventArgs 
   Inherits System.EventArgs
public class DropDownClosingEventArgs : System.EventArgs 
使用例
SyncData プロパティを利用する GcDateTime コントロールを作成するコード例を次に示します。
//  Please use the following namespace
//  using System.Windows.Forms;
//  using GrapeCity.Win.Editors;

public void WireDropDownClosingEvent()
{
    GcDateTime date1 = new GcDateTime();
    date1.DropDownClosing += new EventHandler<DropDownClosingEventArgs>(OnDateDropDownClosing);
}

private void OnDateDropDownClosing(object sender, DropDownClosingEventArgs e)
{
    if ((e.Value is DateTime) && (DateTime)e.Value < DateTime.Now)
    {
        // If the value of drop-down calendar is less than DateTime.Now, 
        // it's not synchornized.
        e.SyncData = false;
    }
}
'  Please use the following namespace
'  Imports System.Windows.Forms;
'  Imports GrapeCity.Win.Editors;

Public Sub WireDropDownClosingEvent()
    Dim GcDateTime1 As New GcDateTime()
    AddHandler GcDateTime1.DropDownClosing, AddressOf OnDateDropDownClosing
End Sub

Private Sub OnDateDropDownClosing(ByVal sender As Object, ByVal e As DropDownClosingEventArgs)
    If (TypeOf e.Value Is DateTime) AndAlso DirectCast(e.Value, DateTime) < DateTime.Now Then
        ' If the value of drop-down calendar is less than DateTime.Now, 
        ' it's not synchornized.
        e.SyncData = False
    End If
End Sub
継承階層

System.Object
   System.EventArgs
      GrapeCity.Win.Editors.DropDownClosingEventArgs

参照

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

 

 


© 2008-2015 GrapeCity inc. All rights reserved.