M
Matthias Kwiedor
I have a Listview in Detail Mode. No i create lines with
ListViewItem lvwItem = new ListViewItem();
lvwItem = new System.Windows.Forms.ListViewItem(new System.Windows.Forms.ListViewItem.ListViewSubItem[] {
new System.Windows.Forms.ListViewItem.ListViewSubItem(null, "text1", System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)))),
new System.Windows.Forms.ListViewItem.ListViewSubItem(null, "text2", System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)))),
}, -1);
lvwItem.UseItemStyleForSubItems = false;
and add this to the listview
Now i want a icon displayd instead of "text2" - does anyone know how this works, i didn't find
something on the net!
I thought that i can change the lvwItem.subitem[1], before adding them to the listview,
but there is only a text and no image value.
Thanks
Matthias
ListViewItem lvwItem = new ListViewItem();
lvwItem = new System.Windows.Forms.ListViewItem(new System.Windows.Forms.ListViewItem.ListViewSubItem[] {
new System.Windows.Forms.ListViewItem.ListViewSubItem(null, "text1", System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)))),
new System.Windows.Forms.ListViewItem.ListViewSubItem(null, "text2", System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)))),
}, -1);
lvwItem.UseItemStyleForSubItems = false;
and add this to the listview
Now i want a icon displayd instead of "text2" - does anyone know how this works, i didn't find
something on the net!
I thought that i can change the lvwItem.subitem[1], before adding them to the listview,
but there is only a text and no image value.
Thanks
Matthias