汨罗东到株洲西:vb给TreeView控件添加节点一例

来源:百度文库 编辑:中财网 时间:2024/05/02 08:15:17
Private sub Form_Load() Dim nodX As Node
Dim i As Integer
Dim j As Integer
TreeView1.LineStyle = tvwRootLines
Set nodX = TreeView1.Nodes.Add(, , "r", "2001年")
For i = 1 To 12
Set nodX = TreeView1.Nodes.Add(1, tvwChild, , i & "月")
Next
nodX.EnsureVisible j = CStr(Month(Now))
Set nodX = TreeView1.Nodes.Add(j + 1, tvwChild, , CStr(Day(Now)) & "日") End Sub  
本文来自: 乘风原创程序(http://www.qqcf.com) 详细出处参考:http://study.qqcf.com/web/161/17235.htm?4256690924=4241702146