2
Reply

How can I set a property associated with a Control onClick when the subroutine is used by multiple Controls?

Joseph Stanish

Joseph Stanish

Apr 14 2007 1:44 AM
2.7k

I have several PictureBox controls that all call the same subroutine on a CLICK event.  The Delegate subroutine looks like this: (where sender is the PictureBox control that was clicked.

private
void AnyPicture_Click(object sender, EventArgs e) {}

How acheive sender.BackColor = Color.Red when any of several PictureBox controls could have raised this CLICK event?


Answers (2)