How to add icon to listview column header from imagelist

Posted on 2007-10-12
Last Modified: 2013-11-26
How to add icon to listview column header from imagelist
Question by:anusdesai
    LVL 46

    Expert Comment

    by:Wayne Taylor (webtubbs)
    Hi anusdesai,

    Use something like this....

         ListView1.Columns(2).ImageIndex = 3 add the 4th image from the list, to the 3rd column (both collections are 0 based).


    LVL 96

    Accepted Solution

    1) Set the SmallImageList property for the ListView

    2) Add a ColumnHeader

    3) Select the ImageIndex for the column header to the image from the ImageList.


    Author Comment

    Cheers mate..will try and be back on monday

    Author Comment

    Cheers mate..tried and it worked great!!!!!!!!!!!!!!!!!!!!!!!!

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
    Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    746 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

    16 Experts available now in Live!

    Get 1:1 Help Now