I'm writing a c# windows app, and as one task, I am creating Panel objects at runtime. I have my custom Panel which is defined as:
class FlowState : Panel
{
:
:
}
I have an init method to set size, location, etc. However once this panel is created on the windows form, I want to handle mouse events, such as mouseDown and mouseUp. If you created a panel at design time and used the gui to define these events, you would get methods like the following (for a panel named 'panel1'):
private void panel1_MouseDown(object sender, MouseEventArgs e)
{
//do stuff
}
How do I put code into my FlowState object which extends Panel to handle mouse events such as this?