Memento

Memento

  • NA
  • 111
  • 133.3k

c# winforms - ToolStripButtons working like a menu

May 31 2012 2:29 AM
c# winforms
I have twelve buttons on a ToolStrip, and want if they could work like a menu.
For each button clickEvent, i wrote:

foreach (ToolStripItem c in ToolStrip1.Items)
  {
  c.ForeColor = Color.Gray;
  }
  Button1.ForeColor = Color.Crimson;  //Button1 replace with Button2, Button3...

I suppose there is a shorter way.
Maybe if could change the CheckOnClick event - not to change BackColor but ForeColor, and change foreColor back to Gray - if some other button is clicked ?
Is there a way, please ?

Answers (1)