TreeViewAction 列挙体
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Public Enumeration TreeViewAction

メンバ名 | 説明 | |
---|---|---|
![]() | ByKeyboard | イベントは、キーストロークによって発生しました。 |
![]() | ByMouse | イベントは、マウス操作によって発生しました。 |
![]() | Collapse | イベントは、TreeNode が折りたたまれたことによって発生しました。 |
![]() | Expand | イベントは、TreeNode が展開されたことによって発生しました。 |
![]() | Unknown | イベントを発生させたアクションは不明です。 |


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

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からTreeViewAction 列挙体を検索する場合は、下記のリンクをクリックしてください。

- TreeViewAction 列挙体のページへのリンク