|
-
Apr 22nd, 2004, 09:40 AM
#1
Thread Starter
Junior Member
Selecting a Treeview Node programatically
Hello all,
I have searched the web without the required information found unfortunately. Also looked on this forum to see if I could find it, but no result, so here is my question:
I want to generate a "button1" that when you click it, it will expand a "treeview1" to (fullpath) "SelectedItem.Reports.Segments"
Basically the button would have to do the same as clicking first on SelectedItem, then on Reports (It would show Segments)
I looked everywhere, but no results, anyone any thoughts on how to establish this? Thanks in advance!
-
Apr 22nd, 2004, 06:54 PM
#2
Registered User
search on the forums. the way to do it is using hashtables. there is no method inherent in vb that lets you select a treenode based on any of its preperties.
-
Apr 23rd, 2004, 03:02 AM
#3
Thread Starter
Junior Member
Hi hi, I'm closing this thread, found the info I needed...
I'm just using simple code to do what I wanted:
VB Code:
Dim tn As TreeNode
tn = tvTasks.TopNode
tvTasks.SelectedNode = tn
tn.Expand()
tn = tvTasks.SelectedNode.FirstNode.NextNode
tn.Expand()
tvTasks.SelectedNode = tn
Me.Show()
thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|