From 9a6bc6560bd3d436cb27e8b5eb8d9b2e0fd08f4d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 18 Sep 2004 19:51:39 +0000 Subject: [PATCH] keep m_value in sync with real combobox value (set it initially and update it correctly in CBN_EDITCHANGE handler) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29208 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/combobox.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index 0967e6e574..5cd1e71bed 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -341,7 +341,7 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) // want the new one) if ( sel == -1 ) { - m_value = GetValue(); + m_value = wxGetWindowText(GetHwnd()); } else // we're synthesizing text updated event from sel change { @@ -481,6 +481,7 @@ void wxComboBox::SetValue(const wxString& value) else SetWindowText(GetHwnd(), value.c_str()); + m_value = value; m_selectionOld = GetSelection(); } -- 2.45.2