I have an extended RichTextBox
:
public class RichTextBoxEx : RichTextBox
{
protected override void OnCreateControl()
{
Text = "Hello World";
base.OnCreateControl();
}
}
When I remove the border using BorderStyle = BorderStyle.None;
, the method is called twice:
protected override void OnCreateControl()
{
BorderStyle = BorderStyle.None;
Text = "Hello World";
base.OnCreateControl();
}
Why is this happening?