Solved

SubClassing the Node type

Posted on 1998-08-26
3
254 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

734 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