如何判定errorprovider的显示状态

Greg_han 2011-07-25 01:45:15
希望在点击buttonOK后,根据errorprovider有没有弹出错误,进行输出Message::box,“errorprovider对象隐藏”或者“errorprovider对象隐藏”


private: System::Void txtVersion_Leave(System::Object^ sender, System::EventArgs^ e)
{
Regex r_expired("^(\\d+\\.\\d+)$");//验证版本号
if(!r_expired.IsMatch(txtVersion->Text)&&txtVersion->Text!="")
{
errorTip->SetError(txtVersion, "X.YYY");
txtVersion->Focus();
txtVersion->SelectAll();
}
else
errorTip->Clear();
errorTip
}
...全文
78 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
鸭梨山大帝 2011-07-25
  • 打赏
  • 举报
回复
这个是C++代码.

errorTip->SetError(txtVersion, "X.YYY");

在里面try..catch..

110,567

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧