tags:

views:

639

answers:

2

Hi all,

I have a read only combo-box with 5 values in, when the user selects a new value what event should I use to write that value to the registry?

Thanks

+4  A: 

Well regardless of what you will end up doing with the value when selected, it is safe to use the SelectionChangeCommitted event.

Here is a little follow up info on this event vs the other commonly used events. (from 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.

Quintin Robinson
I knew it wasn't the obvious, thanks for that.
A: 

I usually use the SelectedIndexChanged event to check when a user selects a value in a combobox

Patrick