为每个控件使用单独的 ErrorProvider 是否存在任何问题?

发布于 2024-11-09 07:11:52 字数 265 浏览 4 评论 0原文

通常,您将为所有内容使用一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情愿 2024-11-16 07:11:52

不应该有任何问题,我宁愿说限制使用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文