• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 471
  • Last Modified:

adding images to a ole class TreeCtrl in msaccess 2003

have a tree control in ms access 2003 and am trying to hook up  pictures to the nodes on the system. cannot seem to fine the way to do it i can bring up the treectl properties and have the image list and the picture tab in front of me but not sure of the syntax to hook up picture to the node its self on load.
the object is called xtree
can access the nodes ok just need the step through to get one attached then i am off. see image below
thanks for your help in advance
treeviewprop.jpg
0
sydneyguy
Asked:
sydneyguy
  • 4
  • 2
1 Solution
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
If I recall correctly, you've got to add an ImageList to the form, then add the Images to that ImageList (with the correct "index" or "key" values), and then assign that ImageList to the Treeview.

This code snippet might help:
http://www.vb-helper.com/howto_treeview_add_node.html
0
 
sydneyguyAuthor Commented:
have been through the article and have an idea that the image list needs to be bound to the project
so i am guessing that the images need to be set up in the image list before i move forward so that i can use
For i = 1 To 6
        TreeImages.ListImages.Add , , TreeImage(i).Picture
    Next i
to set up the images
but when i try to add a image to the image list manually , image list is marked to None ...and cannot seen to set it here and cannot seem to add any pictures to the list help is not available and cannot seem to find any good resources on the subject will keep looking but any ideas
0
 
sydneyguyAuthor Commented:
shot of image set up screen
imagesetup.jpg
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
You must use an ImageList control, which is a separate control from the Treeview. You would add images to that control, then add the entire ImageList control to the Treeview. How you setup and use the INdex and Key properties of the ImageList control, in conjunction with the Tab nodes and how you build them, determines which image shows up on a specific Node.

It's been a while since I've worked with the Microsoft treeview control. I long ago stopped using it, and use a 3rd party control (from Mabry, who unfortuantely is no longer in business).
0
 
sydneyguyAuthor Commented:
thanks as always for the help and the point in the right direction, it alwasys helps to have another set of eyes,found this great site

**************************************************
http://www.mwelling.de/Publication/inside_access.html
***************************************************

with some good down loads all bit it in german but there what i am looking for
thanks for the help
garry
0
 
sydneyguyAuthor Commented:
thanks for the help got me to the best site for the information
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now