C# : changing listbox row colour?

Posted by Meko on Stack Overflow See other posts from Stack Overflow or by Meko
Published on 2010-03-31T16:18:36Z Indexed on 2010/03/31 16:23 UTC
Read the original article Hit count: 382

Filed under:
|

HI. I am trying to changing backround colour of some rows on listbox.I have 2 list that one has all names and it shown on listbox.And second list has some same value with first list.I want to show that when clicking button it will search in listbox and in second list then will change colour where found value. I may search in list box like

  for (int i = 0; i < listBox1.Items.Count; i++)
        {
            for (int j = 0; j < students.Count; j++)

                if (listBox1.Items[i].ToString().Contains(students[j].ToString()))
                {




                }
        }

But I dont know which method to change appearances of row.Any help?

© Stack Overflow or respective owner

Related posts about c#

Related posts about listbox