diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index 41b73b4478..25a2c9cd67 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -321,6 +321,12 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD id) // CBN_EDITCHANGE below sel = GetSelection(); value = GetStringSelection(); + + // this string is going to become the new combobox value soon but + // we need it to be done right now, otherwise the event handler + // could get a wrong value when it calls our GetValue() + ::SetWindowText(GetHwnd(), value); + { wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, GetId()); event.SetInt(sel);