|
-
October 5th, 2001, 05:19 AM
#1
How to change the picture of TreeView when the node is expanded?
Hi!
Does anybody know how to change the picture of TreeView when the node is expanded? (I want to show one picture when the node is expanded and another one when the node is not)
Thanks in advance.
Jaime.
-
October 5th, 2001, 06:03 AM
#2
Re: How to change the picture of TreeView when the node is expanded?
I have found it
private Sub TreeView1_Expand(byval Node as MSComctlLib.Node)
Node.Image = 2
End Sub
private Sub TreeView1_Collapse(byval Node as MSComctlLib.Node)
Node.Image = 1
End Sub
Jaime
-
October 5th, 2001, 06:06 AM
#3
Re: How to change the picture of TreeView when the node is expanded?
You can use the ExpandedImage property of a node. this must be an index of an image in the associated imagelist (just like the image property).
' both "NORMAL" and "EXPANDED" must be images in the imagelist
Dim N as Node
set N = TreeView1.Nodes.Add Key:="ThisNode", Text:="Some Text"
N.Picture = "NORMAL"
N.ExpandedPicture = "EXPANDED"
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
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
|