Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Visual Basic 2010 Programmer's Reference
This is the forum to discuss the Wrox book Visual Basic 2010 Programmer's Reference by Rod Stephens; ISBN: 9780470499832
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Visual Basic 2010 Programmer's Reference section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 14th, 2012, 11:45 PM
Authorized User
Points: 193, Level: 3
Points: 193, Level: 3 Points: 193, Level: 3 Points: 193, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2011
Posts: 31
Thanks: 6
Thanked 0 Times in 0 Posts
Question FullPath Property

Hi Rod,

Can you tell me how to use the FullPath property of a TreeNode object? I would like to automatically send a string representing each Root Node and its children to a separate line of either a text file or a list box.

Thank you again,

Gary
Reply With Quote
  #2 (permalink)  
Old March 15th, 2012, 10:09 AM
Rod Stephens's Avatar
Wrox Author
Points: 3,166, Level: 23
Points: 3,166, Level: 23 Points: 3,166, Level: 23 Points: 3,166, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2006
Location: , , .
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

I think you just use the TreeNode object's FullPath property and it gives you the path from the root to the node. For example, "root\branch\leaf."

To list the children of the root, you'll need to iterate through its Nodes collection. If you want to enumerate all of the tree's nodes, you can do that recursively. I.e. make a routine that enumerates a node and then calls itself for each of that node's children.
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
Reply With Quote
The Following User Says Thank You to Rod Stephens For This Useful Post:
Gary108 (December 16th, 2012)
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
chp 01, get[property name] and set[property name] sandeepgreaternoida BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1 0 May 12th, 2009 01:12 AM
How do I access a property? eramgarden LINQ 2 April 18th, 2009 08:28 AM
property umeshtheone Beginning VB 6 2 May 18th, 2007 12:37 AM
ByRef property rolandatem VB.NET 2002/2003 Basics 1 October 8th, 2005 08:42 AM
Runtime property sonurijs ASP.NET 1.0 and 1.1 Professional 0 September 22nd, 2005 11:44 PM



All times are GMT -4. The time now is 02:28 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.