DarkConsultant
Programmer
Hi All,
I have a form with hundreds of cms/menuitems, one for each textbox. They are all generated dynamically and when clicked all go to the same routine. I can find out which textbox was clicked by this -
MyText = DirectCast(DirectCast(DirectCast(sender, ToolStripMenuItem).Owner, ContextMenuStrip).SourceControl, TextBox).Text
but this is very ugly ... is there a better way?
Regards
DarkConsultant
Live long and prosper \\//
I have a form with hundreds of cms/menuitems, one for each textbox. They are all generated dynamically and when clicked all go to the same routine. I can find out which textbox was clicked by this -
MyText = DirectCast(DirectCast(DirectCast(sender, ToolStripMenuItem).Owner, ContextMenuStrip).SourceControl, TextBox).Text
but this is very ugly ... is there a better way?
Regards
DarkConsultant
Live long and prosper \\//