?
Solved

Treeview items

Posted on 1997-04-21
2
Medium Priority
?
233 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
[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
2 Comments
 
LVL 3

Accepted Solution

by:
mheacock earned 100 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

718 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