Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

VB.net assign image to TreeView node by name

I have to load a TreeView's images from an array of image names (not indexes). Is it possible to load an image from resources to a TreeView node?
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

The images need to be in an ImageList for use with the TreeView.  You could load up the images from the resources into an ImageList at run-time, and associate each Name with the correct Index using a Dictionary.

Do the images really need to be resources though?...why not just load them directly into an ImageList?
Avatar of Murray Brown

ASKER

Hi. Thanks. You are right. They don't need to be in resources. I just realised that they are actually held in a folder, How do you associate each name with a dictionary? Thanks
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Great answer.Thanks very much