开发者

recursive function with dynamic treenode

开发者 https://www.devze.com 2023-03-28 16:07 出处:网络
I have a recursive function wich objective is scann an structure and represent that structure with treenodes.

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

精彩评论

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