G
Guy Noir
I have a quick question on custom controls.
I have a control that I created with a class that extends the
NumericUpDown control.
My problem is that when I use this usercontrol on my form, the click
event gets handled by the user class. I want the event to be passed to
the Windows form (not the user control).
So I am guessing that I need to raise an event from the user control
click event
User Control Click -> Gets handled by the user control method:
private void NumericUpDownControl_Click(object sender, EventArgs e)
{
// Raise an event that I can process on the calling form??
// In other words, I need the click event on the user
control to trigger a method on
// the Windows Form that is using the control.
}
Does this make sense?
Am I on the right track here? Please bear with me as this is my first
attempt at a custom control.
Thanks!
-Guy
I have a control that I created with a class that extends the
NumericUpDown control.
My problem is that when I use this usercontrol on my form, the click
event gets handled by the user class. I want the event to be passed to
the Windows form (not the user control).
So I am guessing that I need to raise an event from the user control
click event
User Control Click -> Gets handled by the user control method:
private void NumericUpDownControl_Click(object sender, EventArgs e)
{
// Raise an event that I can process on the calling form??
// In other words, I need the click event on the user
control to trigger a method on
// the Windows Form that is using the control.
}
Does this make sense?
Am I on the right track here? Please bear with me as this is my first
attempt at a custom control.
Thanks!
-Guy