title: Fill the color in List box Circle in C#.Net in Winforms
body: <p>i have to List box one have Listbox have circle and its value
  i m dynamically create Circle as Per size come from database .....
  i want to fill color in List box  where circle is draw from another List box where 
  Items have color like Red,blue,
  in one item selected in circle list box and then click on second List box color then automatically fill circle list box circle color ..
  Maximum color is selected in color list box is 2 ..
  Means if there are two color selected then half is first color and half is second color fill..
  this is my requirement can you any buddy help me regurding this how to fill circle color...</p>
  
  <pre><code>private void Form1_Load(object sender, EventArgs e)
  {
      listBox1.DrawMode = DrawMode.OwnerDrawVariable;
      listBox1.Items.Add("One");
      listBox1.Items.Add("Two");
      listBox1.Items.Add("Three");
      listBox1.DrawItem += new DrawItemEventHandler(listBox1_DrawItem);    
  }
  
  void listBox1_DrawItem(object sender, DrawItemEventArgs e)
  {
      ListBox l=sender as ListBox;
      e.DrawBackground();
      e.DrawFocusRectangle();
      e.Graphics.DrawEllipse(Pens.Blue, new Rectangle(1, 1+e.Index * 15, 100, 10));
      e.Graphics.DrawString(l.Items[e.Index].ToString(),
            new Font(FontFamily.GenericSansSerif,9, FontStyle.Regular),
            Brushes.Red , e.Bounds);
   }
  </code></pre>