【发布时间】:2012-02-10 07:03:20
【问题描述】:
我目前正在向 treeView 中的父节点添加各种值,虽然我不知道如何添加到树下的特定节点,目前它只是添加到“选定节点”
using (var reader = File.OpenText("Configuration.ini"))
{
List<string> hostnames = ParseExternalHosts(reader).ToList();
foreach (string s in hostnames)
{
TreeNode newNode = new TreeNode(s);
hostView.SelectedNode.Nodes.Add(newNode);
}
【问题讨论】:
-
你想做什么?请举例说明您的期望。