Ensire that m_value is updated when SetSelection is called
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30104 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -254,6 +254,15 @@ WXLRESULT wxComboBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
|
|||||||
UnpackCtlColor(wParam, lParam, &nCtlColor, &hdc, &hwnd);
|
UnpackCtlColor(wParam, lParam, &nCtlColor, &hdc, &hwnd);
|
||||||
|
|
||||||
return (WXLRESULT)OnCtlColor(hdc, hwnd, nCtlColor, nMsg, wParam, lParam);
|
return (WXLRESULT)OnCtlColor(hdc, hwnd, nCtlColor, nMsg, wParam, lParam);
|
||||||
|
|
||||||
|
case CB_SETCURSEL:
|
||||||
|
// Selection was set with SetSelection. Update the value too.
|
||||||
|
if (wParam < 0 || wParam > GetCount())
|
||||||
|
m_value = wxEmptyString;
|
||||||
|
else
|
||||||
|
m_value = GetString(wParam);
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return wxChoice::MSWWindowProc(nMsg, wParam, lParam);
|
return wxChoice::MSWWindowProc(nMsg, wParam, lParam);
|
||||||
|
Reference in New Issue
Block a user