TreeNode视图-显示最新添加的内容 [英] TreeNode View - Show most reecent added

查看:61
本文介绍了TreeNode视图-显示最新添加的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我在表单上有一个树状视图,并且要添加节点,该节点比框的可视区域还要大,因此我向下滚动以查看最新的添加.我在可以显示最近添加的项目之前使用过列表框,因此无需滚动. 在列表框的情况下,我使用了

I've a got a tree view on my form, and I'm adding nodes, which is more then viewable area of the box, so I scroll down to view the most recent add.  I've used listbox before where I'm able to show the most recent item added, so I don't need to scroll.  In the listbox case I used

listBox1.TopIndex = listBox1.Items.Count-1;

listBox1.TopIndex = listBox1.Items.Count - 1;

什么相当于树状视图?

谢谢

推荐答案

TreeNode node = treeView1.Nodes.Add("new node");
node.EnsureVisible();   



这篇关于TreeNode视图-显示最新添加的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆