ARTICLE AD BOX
public Button()
{
this.Size = new Size(100, 100);
this.ForeColor = foreColor;
this.BackColor = BackColor;
this.Text = "Hello";
}
I created this constructor class to create my own custom button object, but it always assigns the default text property and doesn't accept my value. I know I can change the text through the designer, but I want to learn how to do it using code.
EDIT:
I've found the source of the problem: the text of my button is being set automatically according to the class name which I created. I couldn't find a way to fix this outside of the Designer. Is there another method to set the button text without using the designer?
