Saturday, 16 November 2013

How to change Listview subitem back color

How to change the backcolor of a listview subitem using its own value

ListViewItem newlist= new ListViewItem( "Item 1");
newlist.SubItems.Add( "Color" );
newlist.SubItems[1].BackColor = Color.FromArgb( -16711936 );
newlist.UseItemStyleForSubItems = false;

listView1.Items.Add( newlist);

No comments:

Post a Comment