监视组合框值之间变化的最简单方法
我正在寻找一种优雅的方式来跟踪组合框值之间的变化。我想要做的是在 SelectionChanged 事件发生时触发自定义事件,但仅限于特定值更改。这意味着知道初始值是多少。仅当初始值从 z 更改时才会触发该事件。如果初始值为 a、b 或 c,则不会触发该事件。但如果初始值为 z,它将被解雇。
有人有解决这个问题的优雅方法吗?
I'm looking for an elegant way to track changes between values for a combo box. What I'm looking to do is fire a custom event when the SelectionChanged event happens, but only for a specific value changes. This implies knowing what the initial value was. The event will only be fired when the initial value is changed from z. If the initial value is a, b, or c, the event will not be fired. But if the initial value was z, it will be fired.
Does anyone have an elegant way to solve this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为此,您必须创建一个自定义事件处理程序,并且可能是自定义事件参数,
在您的表单中
尚未编译代码,但从逻辑上讲它应该适合您。
For this you will have to create a custom event handler and may be custom event args,
Inside your form
Haven't compiled the code, but logically it should work for you.