Adding different icons to the ListView subitems 
Author Message
 Adding different icons to the ListView subitems

Hello All,

Well, I'm at my wits ends...

Does anyone know a good reference that can show how to add icons to
the subitems of a listview.

I'm trying to do something similar to outlook express where they show
a little paperclip icon when there is an attachment, or an exclamation
mark on a priority message...

I can't find a thing on this.

BTW, I am using VB6

TIA



Fri, 02 Aug 2002 03:00:00 GMT  
 Adding different icons to the ListView subitems
Take a look at the ListSubItems collection of the ListView.  You can set the
ReportIcon of the ListSubItem object.

Assuming a ListView with 3 column headers, and an imagelist with 2 images, you can
try:

    Dim li As MSComctlLib.ListItem
    Dim lsi As MSComctlLib.ListSubItem

    Set li = ListView1.ListItems.Add(, , "ListItem:1")

    li.SubItems(1) = "ListSubItem:1"
    Set lsi = li.ListSubItems(1)
    lsi.ReportIcon = 1

    li.SubItems(2) = "ListSubItem:2"
    Set lsi = li.ListSubItems(2)
    lsi.ReportIcon = 2



Fri, 02 Aug 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Listview with different subitem images

2. Listview with different subitem images

3. Listview - icon in the Subitem

4. Icon to subitem in listview

5. using an icon with listview.subitem

6. Icon to subitem in listview

7. HOW TO: Set SubItem icons in report-style ListView controls

8. ListView SubItem Icon Position

9. Add CheckBox in a ListView SubItem???

10. Adding subitems in Listview

11. Adding icons to a Listview object

12. Adding icons to ListView boxes

 

 
Powered by phpBB® Forum Software