Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SubClassing the Node type

Posted on 1998-08-26
3
Medium Priority
?
261 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 200 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

885 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