i have made a custom control which uses the OnGotFocus event and it work without issues.
I have made a second class which inherited this class and has its own OnGotFocus method. Not i want that the OnGotFocus method from the inherited class should called when OnGotFocus occures but only the base class mehtod is called. How can i change this?
Thx
public partial class MyJobPanel : Panel
{
public MyJobPanel()
{
}
protected override void OnGotFocus(EventArgs e)
{
this.BackColor = Color.SandyBrown;
_isSelected = true;
base.OnGotFocus(e);
}
protected override void OnLostFocus(EventArgs e)
{
this.BackColor = Color.Transparent;
_isSelected=false;
base.OnLostFocus(e);
}
}
public class MyJobTypeToolchange : MyJobPanel
{
public MyJobTypeToolchange() : base()
{
}
protected override void OnGotFocus(EventArgs e)
{
// I want to call this method!!!
base.OnGotFocus(e);
}
public override void OnLostFocus(EventArgs e)
{
// I want to call this method!!!
base.OnLostFocus(e);
}
}