I am using this code to put a image in listbox but the text does not show . When I click on the list then it shows . What is the problem ?
form_load()
{
listbox1.Items.Add("string");
listbox1.DrawMode = DrawMode.OwnerDrawVariable;
}
private void listbox1_DrawItem(object sender, DrawItemEventArgs e)
{
ListBox lst = sender as ListBox;
e.Graphics.DrawImage(imageList1.Images[0], 0, 0, 10, 10);
e.Graphics.DrawString(lst.Text, this.Font,SystemBrushes.ControlDark, 11, 0);
}