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

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

public void WirePopUpOpeningEvent()
{
    GcNumber gcNumber1 = new GcNumber();
    gcNumber1.PopUpOpening += new EventHandler<PopUpOpeningEventArgs>(OnNumberPopUpOpening);
}

private void OnNumberPopUpOpening(object sender, PopUpOpeningEventArgs e)
{
    GcNumber gcNumber1 = sender as GcNumber;
    if (gcNumber1 != null)
    {
        if (gcNumber1.InputStatus != InputStatus.Empty &amp;&amp; gcNumber1.Value == null)
        {
            // Doesn't show the popup window when the value of the GcNumber control is null.
            e.Cancel = true;
            // Doesn't synchronize data from popup window to the GcNumber control.
            e.SyncData = false;
        }
    }
}
'  Please use the following namespace
'  Imports System.Windows.Forms;
'  Imports GrapeCity.Win.Editors;

Public Sub WirePopUpOpeningEvent()
    Dim gcNumber1 As New GcNumber()
    AddHandler gcNumber1.PopUpOpening, AddressOf OnNumberPopUpOpening
End Sub

Private Sub OnNumberPopUpOpening(ByVal sender As Object, ByVal e As PopUpOpeningEventArgs)
    Dim gcNumber1 As GcNumber = TryCast(sender, GcNumber)
    If (Not gcNumber1 Is Nothing) Then
        If gcNumber1.InputStatus <> InputStatus.Empty AndAlso gcNumber1.Value = Nothing Then
            ' Doesn't show the popup window when the value of the GcNumber control is null.
            e.Cancel = True
            ' Doesn't synchronize data from popup window to the GcNumber control.
            e.SyncData = False
        End If
    End If
End Sub
継承階層

System.Object
   System.EventArgs
      System.ComponentModel.CancelEventArgs
         GrapeCity.Win.Editors.PopUpOpeningEventArgs

参照

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

 

 


© 2004-2015 GrapeCity inc. All rights reserved.