Spin control now emits TEXT_ENTER commands.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 2004-03-01 23:28:50 +00:00
parent 16dce3b37b
commit 4a11cca24d
2 changed files with 20 additions and 0 deletions

View File

@ -290,6 +290,16 @@ void wxSpinCtrl::OnChar( wxKeyEvent &event )
}
}
if ((event.GetKeyCode() == WXK_RETURN))
{
wxCommandEvent evt( wxEVT_COMMAND_TEXT_ENTER, m_windowId );
evt.SetEventObject(this);
GtkSpinButton *gsb = GTK_SPIN_BUTTON(m_widget);
wxString val = wxGTK_CONV_BACK( gtk_entry_get_text( &gsb->entry ) );
evt.SetString( val );
if (GetEventHandler()->ProcessEvent(evt)) return;
}
event.Skip();
}

View File

@ -290,6 +290,16 @@ void wxSpinCtrl::OnChar( wxKeyEvent &event )
}
}
if ((event.GetKeyCode() == WXK_RETURN))
{
wxCommandEvent evt( wxEVT_COMMAND_TEXT_ENTER, m_windowId );
evt.SetEventObject(this);
GtkSpinButton *gsb = GTK_SPIN_BUTTON(m_widget);
wxString val = wxGTK_CONV_BACK( gtk_entry_get_text( &gsb->entry ) );
evt.SetString( val );
if (GetEventHandler()->ProcessEvent(evt)) return;
}
event.Skip();
}