如何通过text来选中TreeView 子节点 5
2个回答
展开全部
private void treeFriend_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
{
if (treeFriend.SelectedNode.Text != "我的好友")
{
Thread thread = new Thread(new ParameterizedThreadStart(friendShow));
thread.IsBackground = true;
thread.SetApartmentState( ApartmentState.STA);
thread.Start(treeFriend.SelectedNode.Text);
}
}
private void friendShow(object o)
{
string str = (string)o;
Chat mychat = new Chat();
mychat.Text = str;
mychat.ShowDialog();
}
{
if (treeFriend.SelectedNode.Text != "我的好友")
{
Thread thread = new Thread(new ParameterizedThreadStart(friendShow));
thread.IsBackground = true;
thread.SetApartmentState( ApartmentState.STA);
thread.Start(treeFriend.SelectedNode.Text);
}
}
private void friendShow(object o)
{
string str = (string)o;
Chat mychat = new Chat();
mychat.Text = str;
mychat.ShowDialog();
}
追问
Chat 表示什么,在我的程序中不能运行
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询