Treeview 
Author Message
 Treeview

Hi!

Im using a treeview with three levels: root-child-child that mirrors a
database. I want to get the name(text) of each node when the tree is
expanded. With the following code: "Treeview.SelectedItem.FullPath" I get
the full path. Is it possible to get this divided pr node?

Lars



Fri, 16 Apr 2004 20:11:55 GMT  
 Treeview
No; I think you'll have to walk the tree and grab the text property, as in:

treeview.selecteditem.text
treeview.selecteditem.parent.text
treeview.selecteditem.parent.parent.text

Hope this helps!

Steven Bras, MCSD
Microsoft Developer Support/Visual Basic WebData

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. ? 2001 Microsoft Corporation. All rights
reserved.



Mon, 19 Apr 2004 02:19:00 GMT  
 Treeview
Maybe you can do something with the "split" function ?

If you name the dot as your separator, it will return a string array with
the separated name of all nodes...

Evert

--
=======================================
My email address has been altered to
avoid unwanted email.

Replies to the newsgroup only, please.

Thanks,
Evert Timmer:
Transworld Software
VC++, VB6, SQL Server Database Solutions
http://www.transworld-software.com (under construction)
=======================================


Quote:
> Hi!

> Im using a treeview with three levels: root-child-child that mirrors a
> database. I want to get the name(text) of each node when the tree is
> expanded. With the following code: "Treeview.SelectedItem.FullPath" I get
> the full path. Is it possible to get this divided pr node?

> Lars



Mon, 19 Apr 2004 04:51:11 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Make treeview act like treeview in Outlook

2. Like Treeview AND NOT Like Treeview

3. Copying TreeView nodes to another TreeView

4. Drag/drop from Explorer TreeView to my VB TreeView

5. Drag from Treeview to Treeview

6. Copying a treeview to another treeview

7. Help needed with Treeview/Sheridan Treeview

8. Drag from Treeview to Treeview

9. TreeView :Flicker in TreeView-control

10. Drag/drop from Explorer TreeView to my VB TreeView

11. Treeview Painting Bug! 1 node shown twice in same treeview!

12. Keeping the node highlighted in a TreeView after the Treeview has lost focus?

 

 
Powered by phpBB® Forum Software