我在运行时绘制一行标签并附加名称属性以识别它们我如何获取事件处理程序以获取选定/单击的运行时控件属性(文本)
for (int yy = 1; y < 40; y++)
{
Label TT = new Label();
TT.Name = "TT" + yy.ToString();
TT.Location = new Point(xx, zz);
TT.BorderStyle = BorderStyle.FixedSingle;
TT.Click+= new EventHandler(TT_Click);
TT.Width = 20;
TT.Text = yy.ToString();
this.Controls.Add(TT);
xx += 20;
}
void TT_Click(object sender,EventArgs e)
{
???????????????
}