public ScTextBox(ScMgr scmgr = null) : base(scmgr) { Type = "ScTextBoxEx"; textBox = new ScTextViewBox(scmgr); textBox.ForeColor = Color.Black; ForeFont = new D2DFont("微软雅黑", 12, SharpDX.DirectWrite.FontWeight.Regular); textBox.TextViewLostFocusEvent += TextBox_TextViewLostFocusEvent; Add(textBox); SizeChanged += ScTextBox_SizeChanged; D2DPaint += ScTextBoxEx_D2DPaint; textBox.TextViewKeyDownEvent += TextBox_TextViewKeyDownEvent; textBox.ValueChangedEvent += TextBox_ValueChangedEvent; }
public ScLabel(ScMgr scmgr) : base(scmgr) { foreFont = new D2DFont("微软雅黑", 12, SharpDX.DirectWrite.FontWeight.Regular); D2DPaint += ScLabel_D2DPaint; }