I am trying to create a custom control to use in my application. The control has several panels each panel consisting of different labels. One panel has a button control in it. I am having trouble figuring out how to have my custom control give the end user a
private void button1_Click(object sender, EventArgs e)
{
<User places code here>
}
event to write code in. I do not want the code to be in the actual custom control. I want the end-user using my custom control to be able to add their own control to the button click event of the custom control. Just like the default toolbox button does.
After compiling my custom control and adding it to the toolbox and placing it on a winForm I am not able to even double click the custom control button to get a button_click event. Instead, I get a
private void userControl1_Load(object sender, EventArgs e)
I am new to writing custom controls. Does anyone have an example of how to add events to a custom control such has a button_click event when the end user clicks my custom control button only.
private void button1_Click(object sender, EventArgs e)
{
<User places code here>
}
event to write code in. I do not want the code to be in the actual custom control. I want the end-user using my custom control to be able to add their own control to the button click event of the custom control. Just like the default toolbox button does.
After compiling my custom control and adding it to the toolbox and placing it on a winForm I am not able to even double click the custom control button to get a button_click event. Instead, I get a
private void userControl1_Load(object sender, EventArgs e)
I am new to writing custom controls. Does anyone have an example of how to add events to a custom control such has a button_click event when the end user clicks my custom control button only.