images in list view columns
-
Is there a way to add images into the listview columns kinda like how outlook can display a paperclip instead of text? I have seen that people say that you must tie into the API to do it, but no one provides examples. Does any one know how to do it and is willing to share how they did it? Thanks, - Nick The network is down...let's go get bagels.
-
Is there a way to add images into the listview columns kinda like how outlook can display a paperclip instead of text? I have seen that people say that you must tie into the API to do it, but no one provides examples. Does any one know how to do it and is willing to share how they did it? Thanks, - Nick The network is down...let's go get bagels.
Hi, I don't get what are you trying to do. Adding images to the items or the columns header is very simple to do, no APIs need it. Try something like this
Dim li As ListItem ListView1.ColumnHeaders.Add 1, "col1" ListView1.ColumnHeaders.Add 2, "col2", "col2" 'ImageList1 must have at least one image. Set ListView1.SmallIcons = ImageList1 Set ListView1.ColumnHeaderIcons = ImageList1 Set li = ListView1.ListItems.Add(1, "item1", "", , 1) li.ListSubItems.Add 1, "subItem1", "sutItem", 1 ListView1.ColumnHeaders(1).Icon = 1
I'll suggest you to read the documentation of the control on the MSDN, if after that you still have troubles getting it work as you want, let me know and I'll help you. Fabian
-
Hi, I don't get what are you trying to do. Adding images to the items or the columns header is very simple to do, no APIs need it. Try something like this
Dim li As ListItem ListView1.ColumnHeaders.Add 1, "col1" ListView1.ColumnHeaders.Add 2, "col2", "col2" 'ImageList1 must have at least one image. Set ListView1.SmallIcons = ImageList1 Set ListView1.ColumnHeaderIcons = ImageList1 Set li = ListView1.ListItems.Add(1, "item1", "", , 1) li.ListSubItems.Add 1, "subItem1", "sutItem", 1 ListView1.ColumnHeaders(1).Icon = 1
I'll suggest you to read the documentation of the control on the MSDN, if after that you still have troubles getting it work as you want, let me know and I'll help you. Fabian