Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 265
  • Last Modified:

SubClassing the Node type

Here is the problem I'm using the TreeView control to represent a system that is being developed be the customers, but I need to save more information then I can currently save in a node. ie currently I'm using the Text Property, Tag Property, and Icon Property.  But I need one more piece of information saved with each node.

What I was wondering is if it is possible to subclass the node class and make the TreeView control using this new node type.  The new node type would have an additional property called Number (or something more descriptive).

I need some examples on how this can be accomplished.
1 Solution
Hi I pick this code form : http://www.quiksoft.com/sitemapper/property.htm#DownloadMenus

I hope it help you ...


setup the first branch titled "Products" and add two nodes.
 <branch  name="Products">
      <item href="http://www.quiksoft.com/sitemapper" name="SiteMapper ActiveX Tree Control">
      <item href="http://www.quiksoft.com/easymail"  name="EasyMail ActiveX E-Mail Controls">

 'we will now add a node with no children to the top level.
 <item name="Services" href="http://www.quiksoft.com/services>

 'setup the links branch and add nodes and sub branches
 <branch name="Links">
 <branch name="Links on our site" bitmap=101>
        <item name="Programming information" href="http://www.quiksoft.com/programming.htm">
        <item name="Technical Support"   href="http//www.quiksoft.com/support">
 <branch name="Links on other sites" bitmap=101>
        <item name="CNet" href="http://www.cnet.com">
        <branch name="Microsoft" bitmap=101>
               <item name="Sitebuilders Network" href="http://www.microsoft.com/sitebuilder"  bitmap=2>
               <item name="Home Page" href="http://www.microsoft.com">

clsmasterAuthor Commented:
I'm using the treeview control that comes with VB5.0 not HTML.
Use Node as is, and set its Tag property to a key to a collection of objects having each one all the info you want.


Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now