Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting the icon of a treeview node
Message
 
To
02/11/2004 12:58:15
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows XP
Miscellaneous
Thread ID:
00957159
Message ID:
00957232
Views:
24
This message has been marked as a message which has helped to the initial question of the thread.
Providing the imagelist picture as the same name as the key, and the image file's extensions are the same (BMP or ICO or etc):
MyImageList.ListImages.Add(1,[MYIMAGE],LoadPicture("MYIMAGE.BMP"))
You can use the picture attribute of the node to get the first name:
MyTreeview.Nodes.Add(,1,[Key],[NodeText],[MYIMAGE])
The first name would be:
lcImageName=MyTreeView.nodes('Key').Image
The image file would be:
lcImageFile=lcImageName+[.BMP]

In the downloads - there is a file RIO.ZIP. It offers an another way. It maintains a DBF with the imagefile names.



>Hi
>
>Please, I'd like to set the picture's image control with an icon of treeview control (the selected one)..
>
>Does anyone has any code sample on how to do it ?
>
>TIA
>
>Claudio
Imagination is more important than knowledge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform