Is there a way to apply the same contextmenustrip to more textboxes? I have a WinForm with 6 textboxes and I want my context menu strip to clear the context of a texbox.
private void stergeContinutToolStripMenuItem_Click(object sender, EventArgs e)
{
tb_cnp.Clear();
}
I was wondering if there was a way to change the code so that the contextmenustrip works on every textbox in my form. (I mean, on a generic textbox)
I want to avoid writing the same code for 6 contextmenustrips. Thanks!