(原)Visual Basic TreeView Control Bug
‘当树中设置有图片,并一边加节点,一边选中,结果选中操作不实现
‘请先引用Microsoft Windows Common Controls 6.0 或5.0
‘加ImageList1,加上一张图
‘测试程序
Option Explicit
Dim arr_tmp(3)
Private Sub Form_Load()
arr_tmp(0) = "001"
arr_tmp(1) = "002"
arr_tmp(2) = "003"
arr_tmp(3) = "004"
Dim i As Integer
With Me.TreeView1(0)
.Checkboxes = True
For i = 0 To 3
.Nodes.Add , , "f" & arr_tmp(i), arr_tmp(i), 1 ‘这里是图
.Nodes("f" & arr_tmp(i)).Checked = True ‘<——-这个操作没有实现
Next i
End With
End Sub

