Wrox Programmer Forums
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 14th, 2012, 11:45 PM
Authorized User
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,

Old March 15th, 2012, 10:09 AM
Rod Stephens's Avatar
Wrox Author
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts

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 Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

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

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

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.