Results 1 to 5 of 5

Thread: treeview w/ no key

  1. #1

    Thread Starter
    Hyperactive Member MetallicaD's Avatar
    Join Date
    Feb 2001
    Location
    Tallahassee, FL
    Posts
    488

    treeview w/ no key

    Hello all.. the new treeview class in the .net framework no longer has the all important 'Key' value for each node that uniquely identifies each node. I am rewriting an existing application from VB6 to vb.net. This application relied heavily on the key attribute. Does anyone have suggestions on how i can possibly merge controls, use a different control or maybe utilize an array to get around this issue?

    Thanks for any input you can provide
    -mcd

  2. #2

    Thread Starter
    Hyperactive Member MetallicaD's Avatar
    Join Date
    Feb 2001
    Location
    Tallahassee, FL
    Posts
    488
    Another suggestion. Would I be able to create a new class that inherits form the TreeNode class and add in a key value to it?

    Thanks,
    -mcd
    [vbcode]
    '*****************************
    MsgBox "MCD :: [email protected]", vbInformation + vbOKOnly, "User"
    '*****************************
    [/vbcode]

  3. #3
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    the treenode object just uses index now, but if you need some way to sort of emulate the key, you can use the Tag property of TreeNode object. Tag returns an object so you can place virtually any object, string, numbers, other classes, into it.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  4. #4

    Thread Starter
    Hyperactive Member MetallicaD's Avatar
    Join Date
    Feb 2001
    Location
    Tallahassee, FL
    Posts
    488
    Thank you Cander.. you have come to the rescue again! Ill play around with this idea for a little bit.

    Later
    -mcd
    [vbcode]
    '*****************************
    MsgBox "MCD :: [email protected]", vbInformation + vbOKOnly, "User"
    '*****************************
    [/vbcode]

  5. #5
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    Good luck. Hope that works out.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width