树节点的事件用于通过鼠标单击或通过键盘选择来获取选定的节点. [英] event of tree node is used to get the selected node click by mouse or selected by keyboard.

查看:86
本文介绍了树节点的事件用于通过鼠标单击或通过键盘选择来获取选定的节点.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道在c#.net Windows窗体应用程序中,使用树节点的哪个事件来获取鼠标单击或键盘选择的所选节点.

I want to know which event of tree node is used to get the selected node click by mouse or selected by keyboard in c#.net windows form application.

推荐答案

使用treeView_MouseUp事件.
ti获取当前节点
currentNode = treeView.HitTest(e.Location).Node;
使用
treeView_MouseUp event is used.
ti get current node
currentNode = treeView.HitTest(e.Location).Node;
is used


这篇关于树节点的事件用于通过鼠标单击或通过键盘选择来获取选定的节点.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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