Private Sub Form_Load()
Dim nodX As Node
Set nodX = TreeView1.Nodes.Add(, , "r", "Root")
Set nodX = TreeView1.Nodes.Add("r", tvwChild, "c1", "Child 1")
Set nodX = TreeView1.Nodes.Add("r", tvwChild, "c2", "Child 2")
Set nodX = TreeView1.Nodes.Add("r", tvwChild, "c3", "Child 3")
Set nodX = TreeView1.Nodes.Add("c3", tvwChild, "c4", "Child 4")
Set nodX = TreeView1.Nodes.Add("c3", tvwChild, "c5", "Child 5")
Set nodX = TreeView1.Nodes.Add("c5", tvwChild, "c6", "Child 6")
Set nodX = TreeView1.Nodes.Add("c5", tvwChild, "c7", "Child 7")
nodX.EnsureVisible
TreeView1.BorderStyle = vbFixedSingle
End Sub
Dim nodX As Node
Set nodX = TreeView1.Nodes.Add(, , "r", "Root")
Set nodX = TreeView1.Nodes.Add("r", tvwChild, "c1", "Child 1")
Set nodX = TreeView1.Nodes.Add("r", tvwChild, "c2", "Child 2")
Set nodX = TreeView1.Nodes.Add("r", tvwChild, "c3", "Child 3")
Set nodX = TreeView1.Nodes.Add("c3", tvwChild, "c4", "Child 4")
Set nodX = TreeView1.Nodes.Add("c3", tvwChild, "c5", "Child 5")
Set nodX = TreeView1.Nodes.Add("c5", tvwChild, "c6", "Child 6")
Set nodX = TreeView1.Nodes.Add("c5", tvwChild, "c7", "Child 7")
nodX.EnsureVisible
TreeView1.BorderStyle = vbFixedSingle
End Sub
解决方案 »
- 关于水晶报表分页的问题??
- commondialog.ShowColor的位置问题~??在线等
- SOS
- 安装自己打包的程序出错
- 工具栏中的下拉菜单按钮中,如何使下拉菜单的某一项用粗体显示,就像outlook express里中“发送和接收全部邮件”就是粗体显示的,表示默
- vb中如何实现封闭98系统的PrintScreen和ctrl+N和F1-->F12、ctrl+Insert、shift+insert等键
- 请问怎么在vb中调用excel中的宏,并可以使这些宏能定时运行?先谢了。(100分)
- 我动态的生成一棵树,怎么获得全部叶子节点的text?
- 请问在vb中如何将以字符串表示的16进制数据转化成相应的字节传?小弟有礼了!
- 请教一个关于SQL语句查寻问题?
- 求救!!!!
- 如何编写ADO连接字符串打开设置了安全机制的Access数据库
节点的key不能为数字。改为 sp_id & "A" 或"A" &sp_id就ok拉!