Occurs after the tree node is selected.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
The following code example demonstrates how to use the TreeViewAction enumeration. To run this example, paste the following code in a form that contains a TreeView control named TreeView1. This example requires that TreeView1 is populated with items and the event is connected to the event handler defined in the sample.
' 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
Available since 1.1