Solved

SubClassing the Node type

Posted on 1998-08-26
3
241 Views
Last Modified: 2010-04-30
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.
0
Comment
Question by:clsmaster
3 Comments
 
LVL 3

Expert Comment

by:a111a111a111
ID: 1431159
Hi I pick this code form : http://www.quiksoft.com/sitemapper/property.htm#DownloadMenus

I hope it help you ...
Shay

shay@hili.com

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">
 </branch>

 '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>
 <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">
        </branch>
 </branch>
 </branch>

================end==========
0
 

Author Comment

by:clsmaster
ID: 1431160
I'm using the treeview control that comes with VB5.0 not HTML.
0
 
LVL 3

Accepted Solution

by:
CesarGon earned 100 total points
ID: 1431161
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.

Regards,
César.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now