How can i color a selected item in a listbox ? To color only the selected item text when clicking the mouse right button
<p>It's working in general but since i want to make it color the item only when making right click on the mouse right button it's not working since when im showing/open the listBox it's first going to the DrawItem event:</p>

<pre><code>private void listBox1_MouseDown(object sender, MouseEventArgs e)
        {
            listBox1.SelectedIndex = listBox1.IndexFromPoint(e.X, e.Y);

            if (e.Button == System.Windows.Forms.MouseButtons.Right)
            {
                isColor = true;
            }
        }

        private void listBox1_DrawItem(object sender, DrawItemEventArgs e)
        {
            if (isColor == true)
            {
                if (e.Index &lt; 0) return;
                //if the item state is selected them change the back color 
                if ((e.State &amp; DrawItemState.Selected) == DrawItemState.Selected)
                    e = new DrawItemEventArgs(e.Graphics,
                                              e.Font,
                                              e.Bounds,
                                              e.Index,
                                              e.State ^ DrawItemState.Selected,
                                              e.ForeColor,
                                              Color.Red);//Choose the color

                // Draw the background of the ListBox control for each item.
                e.DrawBackground();
                // Draw the current item text
                e.Graphics.DrawString(listBox1.Items[e.Index].ToString(), e.Font, Brushes.Black, e.Bounds, StringFormat.GenericDefault);
                // If the ListBox has focus, draw a focus rectangle around the selected item.
                e.DrawFocusRectangle();
            }
        }
</code></pre>

<p>I used a flag isColor but since it's first going to the DrawItem event this code is not working good.
Since isColor is flase now in the first time.</p>

<p>EDIT:</p>

<p>Two thing more i need.</p>

<ol>
<li>When clicking the left mouse button on an item it will be marked with regular Blue as before.</li>
<li>When clicking on the right mouse button on an item it will be colored in Red.</li>
<li>To enable multiple chocies so if i click on right mouse it will keep the other items that already in Red so i can select many items to be in Red.</li>
</ol>
