我有一个包含 5 个值的只读组合框,当用户选择一个新值时,我应该使用什么事件将该值写入注册表?
谢谢
最佳答案
好吧,无论您最终将如何处理选中的值,使用 SelectionChangeCommitted
事件都是安全的。
这里是关于此事件与其他常用事件的一些跟进信息。 (来自MSDN)
SelectionChangeCommitted is raised only when the user changes the combo box selection. Do not use SelectedIndexChanged or SelectedValueChanged to capture user changes, because those events are also raised when the selection changes programmatically.
关于C# Combo box value change,我应该使用什么Event来编写更新注册表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1066057/