通过按钮在Windows窗体中对Treeview执行下一个和上一个操作 [英] Performing next and previous operation on treeview in windows form via buttons

查看:92
本文介绍了通过按钮在Windows窗体中对Treeview执行下一个和上一个操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用树形视图并插入了一些节点...说
Parent1
child1
child2
parent2
child1
child2
child3
parent3
child1

依此类推..现在有两个按钮下一个"和上一个",我要分别在下一个"按钮单击和上一个"按钮单击上选择选定父级中的下一个和上一个节点.一旦选择了父级的最后一个节点,则下一个按钮将失去其可见性,与上一个按钮相同.否则两个按钮都可见.
请帮助我.也请提供代码..
在此先感谢..

I am using a tree view and inserted some nodes...say
Parent1
child1
child2
parent2
child1
child2
child3
parent3
child1

and so on..there are two buttons NEXT and PREVIOUS now i want to select next and previous nodes within a selected parent on next button click and previous button click respectively. as soon as the last node of the parent is selected next button looses its visibility and same for previous button..else both the buttons are visible.
Please help me out..supply the code with suggestion as well please..
Thanks in advance..

推荐答案

答案与上次相同-控件具有nextnode和previousnode方法.
Same answer as last time - the control has nextnode and previousnode methods.


这篇关于通过按钮在Windows窗体中对Treeview执行下一个和上一个操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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