当前位置:去回答>生活百科>VB treeview详解

VB treeview详解

2024-08-27 04:31:29 编辑:join 浏览量:524

VB treeview详解

'新建一个窗体,上面放一个TreeView和一个ListView,一个ListImage

'ListImage控件要添加8张以上一样大小的icon文件

'TreeView1和ListView的图像列表都设置成ListImage1

Private Sub Form_Load()

TreeView1.Style = tvwTreelinesPlusMinusPictureText

TreeView1.LabelEdit = tvwManual

TreeView1.Checkboxes = True

ListView1.View = lvwIcon

ListView1.BorderStyle = ccFixedSingle

TreeView1.Nodes.Add , , "r", "学籍管理信息系统", 1

TreeView1.Nodes.Add "r", tvwChild, "r1", "学生基本信息", 2

TreeView1.Nodes.Add "r1", tvwChild, "r11", "个人信息", 3

TreeView1.Nodes.Add "r1", tvwChild, "r12", "家庭信息", 3

TreeView1.Nodes.Add "r", tvwChild, "r2", "学习成绩", 4

TreeView1.Nodes.Add "r2", tvwChild, "r21", "专业成绩", 5

TreeView1.Nodes.Add "r2", tvwChild, "r22", "英语成绩", 5

TreeView1.Nodes.Add "r", tvwChild, "r3", "社团活动", 6

TreeView1.Nodes.Add "r3", tvwChild, "r31", "政治面貌", 7

TreeView1.Nodes.Add "r3", tvwChild, "r32", "获奖情况", 7

For i = 1 To TreeView1.Nodes.Count

TreeView1.Nodes(i).Expanded = True

Next i

End Sub

标签:VB,treeview

版权声明:文章由 去回答 整理收集,来源于互联网或者用户投稿,如有侵权,请联系我们,我们会立即处理。如转载请保留本文链接:https://www.quhuida.com/life/231527.html
热门文章