winform基本控件Label继承问题
mari 2014-12-28 08:50:06 想写个继承自label的控件,但下面代码不起作用,但如果设置背景,却起作用,高手指点一下,非常感谢
namespace FormsControls
{
public partial class Label : System.Windows.Forms.Label
{
public Label()
{
InitializeComponent();
base.AutoSize = false;
base.Height = 22;
base.TextAlign = ContentAlignment.MiddleRight;
base.Text = "MyLabel";
}
}
}