?
Solved

adding images to a ole class TreeCtrl in msaccess 2003

Posted on 2010-01-11
6
Medium Priority
?
464 Views
Last Modified: 2013-11-28
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
Comment
Question by:sydneyguy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 85
ID: 26291820
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
 

Author Comment

by:sydneyguy
ID: 26299271
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
 

Author Comment

by:sydneyguy
ID: 26299282
shot of image set up screen
imagesetup.jpg
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 total points
ID: 26299336
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
 

Author Comment

by:sydneyguy
ID: 26300336
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
 

Author Closing Comment

by:sydneyguy
ID: 31675874
thanks for the help got me to the best site for the information
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question