为每个控件使用单独的 ErrorProvider 是否存在任何问题?
通常,您将为所有内容使用一个 ErrorProvider表单上的控件;但是我有一个控件,它是一个文本框的子类型,需要向用户显示错误。我不希望必须在每个可能使用的错误提供程序上放置一个错误提供程序(然后我想要更多的代码更改)
那么让我的每个控件创建自己的错误提供程序是否存在任何问题?
Normally you would have a single ErrorProvider for all the controls on a form; however I have a control that subtypes a textbox that need to show the user an error. I don’t wish to have to put an error provider on every from it may be used on (more code changes then I would like)
So are there any issues in having each of my controls creating their own error provider?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不应该有任何问题,我宁愿说限制使用 ErrorProvider
因为您将无法显示不遵循该模式的控件的错误。
There shouldn't be any issues, I'd rather say a limiting use of the ErrorProvider
since you won't be able to show errors for the controls that are not following the pattern.