如何在不将鼠标悬停在错误提供程序上的情况下显示错误?
this.errorProvider1.SetError(textBox1, "This field must contain text");
最佳答案
可能不是最好的选择,但应该可行
if (textBox1.Text == "")
{
ErrorProvider myerror = new ErrorProvider();
ToolTip mytip = new ToolTip();
myerror.SetError(textBox1, "This field must contain text");
mytip.Show("This field must contain text", textBox1);
}
关于c# - 如何在不将鼠标悬停在错误提供程序上的情况下显示错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18518902/