C# WinForms ErrorProvider Control

后端 未结 5 1171
暗喜
暗喜 2020-11-27 20:56

Does anyone know if there is a way to get a list of controls that have the ErrorProvider icon active. ie. any controls that failed validation. I\'m trying to avoid looping

5条回答
  •  我在风中等你
    2020-11-27 21:35

    This is a moderately tricky solution you are talking about.

    There is no way to achieve this automatically, as far as I know.

    You have to maintain a flag for every control and manually set it every time an error-provider is blinked.

    May be a Dictionary can be used to keep track of it.

提交回复
热议问题