I\'m a newbie, and recently I\'ve asked this question, where it taught me to have my best option for TextBox\'s bottom border, that prevents flickering/tearing - resulted by
I think you will have to inherit from UserControl
rather than from TextBox
and add a TextBox to your UserControl
. Code below is by no means complete but should show you what I'm talking about
public partial class TextBoxMaterial : UserControl
{
public TextBoxMaterial()
{
InitializeComponent();
this.Controls.Add(new Label()
{
Height = 2,
Dock = DockStyle.Bottom,
BackColor = Color.Gray,
});
this.Controls.Add(new TextBox()
{
Left = 10,
Width = this.Width - 20,
BackColor = this.BackColor,
BorderStyle = BorderStyle.None,
});
}
}