what i’m basicaly wan to do, is add somme items in a toolstripdropdownbutton.
What i did was:
toolStripDropDownButtonColor.DropDownItems.Add("text", null, ChangeTextColor);
But now i need to change the fore en the back color of those items, so i saw that i can use ToolStripItem. And here i can set the propertys i want to,
But: How do i declare sommething like that? i have sommething like this:
ToolStripItem fs;
fs.Text = c.ToString();
fs.ForeColor = System.Drawing.Color.FromKnownColor(c);
fs.BackColor = System.Drawing.Color.FromKnownColor(c);
fs.Click += ChangeTextColor;
toolStripDropDownButtonColor.DropDownItems.Add(fs);
ToolStripItemis abstract class, so You can’t declare object of this class. In this case, You can useToolStripMenuIteminstead: