generate TEXT_ENTER event when Enter is pressed in a combobox
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -201,6 +201,17 @@ bool wxComboBox::MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam)
|
||||
switch ( msg )
|
||||
{
|
||||
case WM_CHAR:
|
||||
// for compatibility with wxTextCtrl, generate a special message
|
||||
// when Enter is pressed
|
||||
if ( wParam == VK_RETURN )
|
||||
{
|
||||
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
|
||||
InitCommandEvent(event);
|
||||
event.SetString(GetValue());
|
||||
event.SetInt(GetSelection());
|
||||
ProcessCommand(event);
|
||||
}
|
||||
|
||||
return HandleChar(wParam, lParam, TRUE /* isASCII */);
|
||||
|
||||
case WM_KEYDOWN:
|
||||
|
Reference in New Issue
Block a user