Everyone:
I have a WinForm in which I dynamically create tabs based on some user
input. Inside those tabs are some text boxes for data. I can do
everything but fire events properly. I have a click event for one of
the text boxes on each tab. When I click on the text box the event is
fired but I don't know how to check which text box on which tab has
been fired.
Thank you for the help.
Sincerely,
Dale Williams
I have the following code to add the text box to the tab:
// Add text box to display formulas, etc.
TextBox l_objTB = new TextBox();
l_objTB.Name = "txt-" + l_objSubRow["RFQQuantityId"].ToString() +
"-" + l_objSubRow["RecType"].ToString();
l_objTB.Enabled = true;
l_objTB.Width = 250;
l_objTB.Top = l_objSubTabCon.Top;
l_objTB.Click +=new EventHandler(l_objTB_Click);
l_objSubTabCon.TabPages[l_lSubLoop].Controls.Add(l_objTB);
I have the following click event for the text box.
private void l_objTB_Click(object sender, EventArgs e)
{
e.ToString();
}