I have a program that has a TreeView
. I made it in such a way if user holds Control
Key the data from each Node
of taht treeview is being addded continiously to a ListView
. Now what I want to do is to programatically select this nodes while simulating the Control key is being pressed.
So the point is, if Control key is not being pressed, the listview which is responsible to show data related to that node, will get cleaned on node select. If control key is being pressed, the data from newly selected node will appended to the list view.
Is there a way to send a key hold message? I mean something like this:
var nodeCount = tvTestGroups.Nodes.Count;
for(int i = 0; i <nodeCount; i++)
{
SendKeys.Send("Control");
tvTestGroups.SelectedNode = tvTestGroups.Nodes[i];
}