Change text color of a listbox item

  1. Change DrawMode = OwnerDrawFixed

private void listBox1_DrawItem(object sender, DrawItemEventArgs e) {

e.DrawBackground();

e.Graphics.DrawString(listBox1.Items[e.Index].ToString(), listBox1.Font, Brushes.Green, e.Bounds);

}

Anuncios