E
eljainc
Hello,
I am trying to figure out how to efficiently do the following:
Say I have 10 TextBox fields on a form. From each of those, I would
like to have
a right click context menu. There are 10 menu items on the context
menu. Once
one of those items are selected, I would like the text to be copied
into the text field
of the appropriate textbox.
In the click Handler, I have something like:
private void myToolStripMenuItem_Click(object sender, EventArgs e)
{
ToolStripMenuItem m = (ToolStripMenuItem)sender;
string mystr = m.Text;
// set the text field
}
Can someone tell me the c# construct to set the Text property of the
"calling" object, in this case a textbox?
Thanks
Mike
I am trying to figure out how to efficiently do the following:
Say I have 10 TextBox fields on a form. From each of those, I would
like to have
a right click context menu. There are 10 menu items on the context
menu. Once
one of those items are selected, I would like the text to be copied
into the text field
of the appropriate textbox.
In the click Handler, I have something like:
private void myToolStripMenuItem_Click(object sender, EventArgs e)
{
ToolStripMenuItem m = (ToolStripMenuItem)sender;
string mystr = m.Text;
// set the text field
}
Can someone tell me the c# construct to set the Text property of the
"calling" object, in this case a textbox?
Thanks
Mike