, TreeView.NodeMouseClick, ? , foreach :
foreach (TreeNode node in treeView1.Nodes)
{
treeView1_NodeMouseClick(node, null);
}
, ,
treeView1.NodeMouseClick += new TreeNodeMouseClickEventHandler(treeView1_NodeMouseClick);
sloppy , :
public void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
{
TreeNode node = sender as TreeNode;
if (node != null)
MessageBox.Show(node.Text);
}
null TreeNodeMouseClickEventArgs, .
:
Looks like you just have to just call the AfterSelect (...) method by directly calling when your user clicks the Expand All button. So, if I guess correctly about your architecture, you want to add an AfterSelect call to the click handler of your Expand All button
source
share