Click here to Skip to main content
15,886,069 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Depending on what is checked I will need to perform specific calculations.  So If a certain node is selected Then perform math calculation, else if another node is selected, then perform a different math calculation, then show the answer in a messagebox or a label. ....there will be three choices to choose from.  The issue is that it seems that the code doesnt even recognize which node has been selected.  One parent and three children. Only the children are important and need recognized when selected.

What I have tried:

<pre> tried  If TreeView1.SelectedNode.Equals(TreeView1.Nodes(0)) Then .... but not working.  If TreeView1.SelectedNode Is TreeView1.Nodes(1)....Then but not working...Its not picking up the choice to even determine which code to use afterwords.  
Posted
Updated 11-Jul-21 21:52pm
v2

1 solution

Here is an example:

Private Sub TabsTreeView_AfterSelect(ByVal sender As Object,
    ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles TabsTreeView.AfterSelect


    Select Case e.Node.Text

        Case "Start Wizard"
            'Do this ...

       Case "Back"
            'Do that ...

       Case "Cancel"
            'Cancel ...

        Case Else

   End Select
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900