English 中文(简体)
• 如何将节点推向DevExpress。 XtraTreeList.TreeList
原标题:How to traverse the nodes for a DevExpress.XtraTreeList.TreeList

我试图驳斥DevExpress的口号。 XtraTreeList. 树木和草原。

基本上,我所想到的是,我所想的诺言的上限和价值。 我能否找到简单的方法。 在发现之后,我只是把重点转向新的节点,我已经知道,如果我有适当的指数,如何做到这一点。

增 编

最佳回答

我最后使用<代码>Queue,然后使用目前的代号特里.nodes<>。

Dim text As String = "looking for this"
Dim myQueue As New Queue
For i As Integer = 0 To tree.Nodes.Count - 1
    If tree.Nodes(i).GetDisplayText("name").Equals(text ) Then
          tree.SetFocusedNode(tree.Nodes(i))
          Exit Sub
    Else
          If tree.Nodes(i).HasChildren Then
               myQueue.Enqueue(tree.Nodes(i))
          End If
    End If
Next

While myQueue.Count > 0
    Dim tempNode As DevExpress.XtraTreeList.Nodes.TreeListNode = CType(myQueue.Dequeue, DevExpress.XtraTreeList.Nodes.TreeListNode)
    For i As Integer = 0 To tempNode.Nodes.Count - 1
          If tempNode.Nodes(i).GetDisplayText("name").Equals(e.Button.Caption) Then
              tree.SetFocusedNode(tempNode.Nodes(i))
              Exit Sub
          Else
              If tempNode.Nodes(i).HasChildren Then
                   myQueue.Enqueue(tempNode.Nodes(i))
              End If
          End If
    Next
End While
问题回答

这些任务应当使用通知器执行。 请参看

在这方面。 我们的文件描述了诺德人:

NodesIterator





相关问题
How to speed up Visual Studio 2008? Add more resources?

I m using Visual Studio 2008 (with the latest service pack) I also have ReSharper 4.5 installed. ReSharper Code analysis/ scan is turned off. OS: Windows 7 Enterprise Edition It takes me a long time ...

Trouble with VS.PHP installing it s own Apache server

I tried installing VS.PHP some time ago. I was intent on seeing how it works with my current setup. I immediately encountered trouble: none of my sites wanted to render. On windows, I m using WAMP ...

Jquery and Intellisense in VS 2008 with hotfix and SP1

I followed Scott Guthrie s instructions as outlined at http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx but no avail: intellisense still doesn t work. Any tips?

Fixing "error C2065: undeclared identifier"

First off, I m completely out of my depth here. So the question might be the wrong one to ask, but here goes... As per the accepted answer to this question, I m trying to compile the bindings for the ...

View whitespace in VS2008

After Jeph most recent post: http://www.codinghorror.com/blog/archives/001310.html, I thought to myself it would be fun to see if any of my code has those trailing whitespaces. So I open Visual ...