user449921
user449921

Reputation: 251

C# treenode node text

I'm adding Nodes to TreeView dynamically. I'm just creating labels and add them to nodes. My treeView looks like that:

TreeView 1

-Node 1

  - Node 1.1

      -Node 1.1.1

         -Node 1.1.1.A

          -Node 1.1.1.B

      -Node 1.1.2

          -Node 1.1.2.A 

After click nodes, i want only do something if clicked node is: Node 1.1.1.A, Node 1.1.1B or Node 1.1.2.A. So i'm checking labels, but label in nodes 1.1.1 and 1.1.2 are changing in while loop so how can i check it?

Upvotes: 0

Views: 456

Answers (1)

Iain Ward
Iain Ward

Reputation: 9936

You could put something in the Tag property, like a bool, that specifies which ones should trigger something, and then when one is clicked check to see if it has it but it would help if you could clarify your question with more detail

Upvotes: 2

Related Questions