开发者

recursive function with dynamic treenode

I have a recursive function wich objective is scann an structure and represent that structure with treenodes.

Inside my 开发者_运维百科function depends the structure I'll have to create another treenode inside my treenode or just create a node.

My problem is that I don't know how to remember my treenode position when I have to call my function again.

    If strTop.TextString.ToUpper = "DMN" Then

        gcTreeno.Nodes.Add("Node")

    Else
        Dim perf As New TreeNode
        gcTreeno.Nodes.Add(perf)

    End If

if i would like to write next time a node into perf, how i could do it ?


Just check the other functions .. you can pass a Key Value to your node.

like gcTreeno.Nodes.Add("key", "text")

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜