Solved

Treeview items

Posted on 1997-04-21
2
202 Views
Last Modified: 2010-04-04
I have a file of strings like c:\acad\j\loop\unit-30.  I would like to build a tree from them without duplicating any nodes. The first node would be "c:", the second would be "acad" and so on.  The next string would be "c:\acad\j\loop\unit-31".  I don't want to have another level 1 node of "c:", In this case I would just like to add "unit-31" to the loop node as a child.
0
Comment
Question by:DPomeroy
2 Comments
 
LVL 3

Accepted Solution

by:
mheacock earned 50 total points
ID: 1335605
You atart at level one all the time...compare c: to everything at level one, if it exists, then go to level two off of that node, if it doesn't exist, then add it.  At level two you check to see if there is already a level two that matches the level two you are looking for, if so, then go to its level 3, if not add it.
0
 

Author Comment

by:DPomeroy
ID: 1335606
I can't figure out how to do the compare.  Do I you something like this.  If CurrentSubdirectory (c:) <> treeview1.node.text then addchild(CurrentSubdirectory)?  I still can't figure out how to access the properties of the class and what properties there are.  Also I can't figure out how to do the methods and I think I should be able to make a new class and add some more properties and methods.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Windows Drag & Drop Location 2 85
Master Detail with TADODataset 4 96
delphi parse string to params 3 81
Working with hours 3 31
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video discusses moving either the default database or any database to a new volume.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

708 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

15 Experts available now in Live!

Get 1:1 Help Now