ownerdraw icon in listbox

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?QmVu?=

    ownerdraw icon in listbox

    Hi
    I have this list box with 2 columns.
    In column 1 I want to but an Icon to represent a person name in column 2
    Because, I want to to have the listview selection color different from the
    system color, I have to go ownerdrawn
    But I cannot see how to draw the individual icons in col 1
    The following code adds the icon from the imagelist and the text. I can draw
    the text, but I cannot draw the icons in col1.

    So, using ListViewItem1_D rawItem

    Code:

    ListViewItem1.S mallImageList = ImageList1

    Dim myItems As New ListViewItem("" , 0)
    ListViewItem1.I tems.Add(myItem s)
    ListViewItem1.S ubItems.Add(som etext)
    ListViewItem1.S ubItems.Add(som etext)

    Any suggestions
    Thanks





Working...