回复 11楼linnerchen的帖子
不要这么邪恶好不?这样代码不够健壮,试试看这个- private void Form1_Load(object sender, EventArgs e)
- {
- this.gcDate1.AlternateText.Null.Text = "\n";
- this.gcDate1.AlternateText.Null.ForeColor = this.gcDate1.ForeColor;
- this.gcDate1.TextChanged += gcDate1_TextChanged;
- }
- void gcDate1_TextChanged(object sender, EventArgs e)
- {
- if (this.gcDate1.InputStatus == GrapeCity.Win.Editors.InputStatus.Empty)
- {
- this.gcDate1.Clear();
- }
- }
复制代码 |