Associate Image with Treview Node

Posted on 2005-04-22
Last Modified: 2010-05-02
I have an Imagelist defined on the MDI child form which has my treeview control.  The name of the imagelist is Imaglist1 and the keys of the 6 images in the list are Img1, Img2 .... Img6.

I associated the Image list with the treeview in the treeview properties.

I am now adding node to my tree and want to associate a specific image with each level.

To add my first node I am using:
         TApickTree.Nodes.Add , , SiteTag, "Site - " & Trim(SitesRS!SiteName), "Img1"

I am not getting an error or any exceptions but I am not gettingmy image either.  Is my syntax wrong?
Question by:mlcktmguy
    1 Comment
    LVL 8

    Accepted Solution

    make sure TApickTree.Style = tvwTreelinesPlusMinusPictureText

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
    You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    761 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now