|
-
Nov 10th, 2000, 11:08 AM
#1
Thread Starter
Lively Member
I have a treeview with several parent and child views, but only those two layers. I want to grab the text from the Parent when I click on the child, is there a way to do this.
In otherwords if I have this:
Fred
|
|----Address
|----Phone Number
And i click on address, I want to set a string variable to the Text of the parent, in this case Fred. Thanks in advance
Ed Farias
-
Nov 10th, 2000, 06:24 PM
#2
Fanatic Member
Here you go:
Code:
Private Sub myTree_NodeClick(ByVal Node As MSComctlLib.Node)
Dim myText
If Node.Children > 0 Then Exit Sub
myText = Node.Parent.Text
MsgBox myText
End Sub
www.RealisticGraphics.net
Running VS.Net Enterprise & VB 6
Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML
MSN Messenger: kmsheff
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
|