treeview 控件的使用(please help me) 我在使用treeview 控件,为什么当我在单击各节点时,不产生click事件? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 NodeClick 事件 在一个 Node 对象被单击时,这个事件便发生。语法Private Sub object_NodeClick(ByVal node As Node)NodeClick 事件的语法包含下面部分:部分 描述 object 对象表达式,其值是“应用于”列表中的一个对象。 node 对被点取的 Node 对象的引用。 说明在单击节点对象之外的 TreeView 控件的任何部位,标准的 Click 事件发生。当单击某个特定的 Node 对象时,NodeClick 事件发生;NodeClick 事件也返回对特定的 Node 对象的引用,在下一步操作之前,这个引用可用来使这个 Node 对象可用。NodeClick 事件发生在标准的 Click 事件之前。 给你一个例子好好看一下就明白了.Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node) Select Case Node.Key Case "Bill": mnuBill_Click Case "TBill": mnuTBill_Click Case "BillView": mnuBillView_Click Case "Account": mnuCheck_Click Case "Query": mnuQuery_Click Case "Report3": mnuReport3_Click加载: With TreeView1 Set tNode = .Nodes.Add(, tvwFirst, "Root", Apptitle, ImageList1.ListImages("Home").Index) #If CLIENT = 1 Then .Nodes.Add tNode, tvwChild, "Bill", "收费通知书", ImageList1.ListImages("New").Index .Nodes.Add tNode, tvwChild, "TBill", "罚款通知书", ImageList1.ListImages("TNew").Index .Nodes.Add tNode, tvwChild, "BillView", "查询", ImageList1.ListImages("View").Index #Else .Nodes.Add tNode, tvwChild, "Account", "数据核对", ImageList1.ListImages("Check").Index #End If Set tChild = .Nodes.Add(tNode, tvwChild, "Reports", "统计", ImageList1.ListImages("Folder").Index) '.Nodes.Add tChild, tvwChild, "Counter", "统计报表", ImageList1.ListImages("Counter").Index .Nodes.Add tChild, tvwChild, "Report1", "部门统计", ImageList1.ListImages("Counter").Index .Nodes.Add tChild, tvwChild, "Report2", "部门汇总统计", ImageList1.ListImages("Counter").Index .Nodes.Add tChild, tvwChild, "Report3", "市局机关汇总统计", ImageList1.ListImages("Counter").IndexEND WITH vb拼图游戏,求大神详解 读取文本文件并定时发送的问题(300里加急!!!!!!!!!!!) 请教DataGrid自动填零的问题? 关于Msgbox显示百分数 不用API,VB是否能取得指定目录下的文件名和它的文件类型?(每个问题最少10分) listview 和Access2000数据库 filesystemobject如何利用通配符 AddressOf用法 SOCKER数据传输 问几个api函数的意思 如何使一个顶层窗口能和其他模态窗口进行切换? bmp转换为jpg的实现方法那位帮帮忙
NodeClick 事件
在一个 Node 对象被单击时,这个事件便发生。语法Private Sub object_NodeClick(ByVal node As Node)NodeClick 事件的语法包含下面部分:部分 描述
object 对象表达式,其值是“应用于”列表中的一个对象。
node 对被点取的 Node 对象的引用。
说明在单击节点对象之外的 TreeView 控件的任何部位,标准的 Click 事件发生。当单击某个特定的 Node 对象时,NodeClick 事件发生;NodeClick 事件也返回对特定的 Node 对象的引用,在下一步操作之前,这个引用可用来使这个 Node 对象可用。NodeClick 事件发生在标准的 Click 事件之前。
Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)
Select Case Node.Key Case "Bill":
mnuBill_Click
Case "TBill":
mnuTBill_Click
Case "BillView":
mnuBillView_Click Case "Account":
mnuCheck_Click
Case "Query":
mnuQuery_Click
Case "Report3":
mnuReport3_Click加载:
With TreeView1
Set tNode = .Nodes.Add(, tvwFirst, "Root", Apptitle, ImageList1.ListImages("Home").Index)
#If CLIENT = 1 Then
.Nodes.Add tNode, tvwChild, "Bill", "收费通知书", ImageList1.ListImages("New").Index
.Nodes.Add tNode, tvwChild, "TBill", "罚款通知书", ImageList1.ListImages("TNew").Index
.Nodes.Add tNode, tvwChild, "BillView", "查询", ImageList1.ListImages("View").Index
#Else
.Nodes.Add tNode, tvwChild, "Account", "数据核对", ImageList1.ListImages("Check").Index
#End If
Set tChild = .Nodes.Add(tNode, tvwChild, "Reports", "统计", ImageList1.ListImages("Folder").Index)
'.Nodes.Add tChild, tvwChild, "Counter", "统计报表", ImageList1.ListImages("Counter").Index
.Nodes.Add tChild, tvwChild, "Report1", "部门统计", ImageList1.ListImages("Counter").Index
.Nodes.Add tChild, tvwChild, "Report2", "部门汇总统计", ImageList1.ListImages("Counter").Index
.Nodes.Add tChild, tvwChild, "Report3", "市局机关汇总统计", ImageList1.ListImages("Counter").Index
END WITH