Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
下载信息 [文件大小: 下载次数: ] | |
![]() |
If Lsj.Contains(e.Node.Text) = False Then
Lsj.Add(e.Node.Text)
End If
e.Form.Controls("TextBox2").value =Nothing
For Each s As String In Lsj
e.Form.Controls("TextBox2").value += "," & s
Next
If Lsj.count>3 Then
For Each nd As WinForm.TreeNode In e.Sender.AllNodes
If nd.Text = Lsj(0) Then
nd.BackColor = Color.White
Lsj.RemoveAt(0)
If lsJ.Count =0 Then
Exit For
End If
End If
Next
End If
For Each nd As WinForm.TreeNode In e.Sender.AllNodes
For Each s As String In Lsj
If nd.Text = s Then
nd.BackColor = Color.LightGray
End If
Next
Next
If Lsj.Contains(e.Node.Text) = False Then
Lsj.Add(e.Node.Text)
End If
e.Form.Controls("TextBox2").value =Nothing
For Each s As String In Lsj
e.Form.Controls("TextBox2").value += "," & s
Next
If Lsj.count>3 Then
For Each nd As WinForm.TreeNode In e.Sender.AllNodes
If nd.Text = Lsj(0) Then
nd.BackColor = Color.White
Lsj.RemoveAt(0)
If lsJ.Count =0 Then
Exit For
End If
End If
Next
End If
For Each nd As WinForm.TreeNode In e.Sender.AllNodes
For Each s As String In Lsj
If nd.Text = s Then
nd.BackColor = Color.LightGray
End If
Next
Next
多谢先!
这个是不报错了,只是有点不明:我设置了If Lsj.count>3 Then才执行If...End if里面的代码呀,为何里面还须
If lsJ.Count =0 Then
Exit For明白哪出错了:如不加Exit For,则Lsj为空时执行RemoveAt(0)会报错!多谢狐爸,正确的是:
If Lsj.Contains(e.Node.Text) = False Then
Lsj.Add(e.Node.Text)
End If
If Lsj.count>3 Then
For Each nd As WinForm.TreeNode In e.Sender.AllNodes
If nd.Text = Lsj(0) Then
nd.BackColor = Color.White
Lsj.RemoveAt(0)
Exit For
End If
Next
End If
For Each nd As WinForm.TreeNode In e.Sender.AllNodes
For Each s As String In Lsj
If nd.Text = s Then
nd.BackColor = Color.LightGray
End If
Next
Next