TreeViewAction 列挙体とは? わかりやすく解説

TreeViewAction 列挙体

TreeViewEventArgs イベント発生させたアクション指定します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Dim instance As TreeViewAction
public enum TreeViewAction
public enum class TreeViewAction
public enum TreeViewAction
public enum TreeViewAction
メンバメンバ
 メンバ説明
.NET Compact Framework によるサポートByKeyboardイベントは、キーストロークによって発生しました。 
.NET Compact Framework によるサポートByMouseイベントは、マウス操作によって発生しました。 
.NET Compact Framework によるサポートCollapseイベントは、TreeNode が折りたたまれたことによって発生しました。 
.NET Compact Framework によるサポートExpandイベントは、TreeNode展開されたことによって発生しました。 
.NET Compact Framework によるサポートUnknownイベント発生させたアクション不明です。 
解説解説

この列挙体は、TreeViewEventArgs コンストラクタなどのメンバ使用されます。

使用例使用例

TreeView.AfterSelect イベントTreeViewAction 列挙体の使用方法を示すコード例次に示します。この例を実行するには、TreeView1 という名前の TreeView コントロール配置されているフォームに、次のコード貼り付けます。この例は、TreeView1 に項目が読み込まれていて TreeView.AfterSelect イベントサンプル内で定義されイベント処理メソッド関連付けられていることを前提にしています。

' Handle the After_Select event.
Private Sub TreeView1_AfterSelect(ByVal
 sender As System.Object, _
    ByVal e As System.Windows.Forms.TreeViewEventArgs)
 _
        Handles TreeView1.AfterSelect

    ' Vary the response depending on which TreeViewAction
    ' triggered the event. 
    Select Case (e.Action)
        Case TreeViewAction.ByKeyboard
            MessageBox.Show("You like the keyboard!")
        Case TreeViewAction.ByMouse
            MessageBox.Show("You like the mouse!")
    End Select
End Sub
// Handle the After_Select event.
private void TreeView1_AfterSelect(System.Object
 sender, 
    System.Windows.Forms.TreeViewEventArgs e)
{

    // Vary the response depending on which TreeViewAction
    // triggered the event. 
    switch((e.Action))
    {
        case TreeViewAction.ByKeyboard:
            MessageBox.Show("You like the keyboard!");
            break;
        case TreeViewAction.ByMouse:
            MessageBox.Show("You like the mouse!");
            break;
    }
}
private:
   // Handle the After_Select event.
   void TreeView1_AfterSelect( System::Object^ /*sender*/, System::Windows::Forms::TreeViewEventArgs^
 e )
   {
      
      // Vary the response depending on which TreeViewAction
      // triggered the event. 
      switch ( (e->Action) )
      {
         case TreeViewAction::ByKeyboard:
            MessageBox::Show( "You like the keyboard!" );
            break;

         case TreeViewAction::ByMouse:
            MessageBox::Show( "You like the mouse!" );
            break;
      }
   }
// Handle the After_Select event.
private void treeView1_AfterSelect(Object sender
,
    System.Windows.Forms.TreeViewEventArgs e)
{
    // Vary the response depending on which TreeViewAction
    // triggered the event. 
    switch (e.get_Action()) {
        case TreeViewAction.ByKeyboard:
            MessageBox.Show("You like the keyboard!");
            break;
        case TreeViewAction.ByMouse:
            MessageBox.Show("You like the mouse!");
            break;
    }
} //treeView1_AfterSelect
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「TreeViewAction 列挙体」の関連用語

TreeViewAction 列挙体のお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



TreeViewAction 列挙体のページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS