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 ScTextBox(ScMgr scMgr = null) { Type = "ScTextBox"; this.ScMgr = scMgr; textBox = new ScTextViewBox(scMgr); textBox.ForeColor = Color.Black; textBox.ForeFont = new Font("微软雅黑", 12); Add(textBox); SizeChanged += ScTextBox_SizeChanged; GDIPaint += ScTextBox_GDIPaint; textBox.TextViewKeyDownEvent += TextBox_TextViewKeyDownEvent; textBox.ValueChangedEvent += TextBox_ValueChangedEvent; }
public ScVxSearch() { textBox = new ScTextViewBox(); textBox.ForeColor = Color.WhiteSmoke; textBox.ForeFont = new Font("微软雅黑", 15); Add(textBox); search = new ScLayer(); Add(search); GDIPaint += ScVxDate_GDIPaint; SizeChanged += ScVxDate_SizeChanged; search.GDIPaint += Search_GDIPaint; search.MouseEnter += Search_MouseEnter; search.MouseLeave += Search_MouseLeave; search.MouseDown += Search_MouseDown; textBox.TextViewKeyDownEvent += TextBox_TextViewKeyDownEvent; }