I'm adding an array of Panel objects (which in turn contain other items) to a form at runtime. Then, I'm assigning a click event to each panel inside a loop like so:
pnlInstrument[index].Click += pnlInstrument_Click;
The empty click function looks like this:
private void pnlInstrument_Click(object sender, EventArgs e)
{
}
The event is triggering correctly, but how can I tell which panel was clicked?