Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

accessing a control from another class

Status
Not open for further replies.

TiltingCode

Programmer
Apr 10, 2009
61
US
I have a form where I have a treeview control.

I have classes in that project where I want to change the text of a node in that form. Apparently I have to use get\set and I've spent way too many hours trying to figure this out.


Code in the form:
Code:
TreeNode JobNode = new TreeNode();

[COLOR=red]// Bunch of loop code here[/color]
JobNode = tvwCompose.Nodes.Add(strParentText);

[COLOR=red]// Bunch of additional code here where I do an inner loop where I will be creating child nodes:[/color]
JobNode.Nodes.Add(strChildText);

Eventually I will be doing work in a class which dictates I have to change the text in a node. Please tell me how to do that?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top