From b2531949f397726d45867b57239f4bb342456ab4 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 21 Apr 2000 17:43:11 +0000 Subject: [PATCH] Put the control's value in the event object for EVT_TEXT_ENTER git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/textctrl.cpp | 3 ++- src/gtk1/textctrl.cpp | 3 ++- src/msw/textctrl.cpp | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 0f8df9de99..b0e2ef148a 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -614,7 +614,7 @@ bool wxTextCtrl::Enable( bool enable ) // nothing to do return FALSE; } - + if (m_windowStyle & wxTE_MULTILINE) { gtk_text_set_editable( GTK_TEXT(m_text), enable ); @@ -812,6 +812,7 @@ void wxTextCtrl::OnChar( wxKeyEvent &key_event ) { wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); event.SetEventObject(this); + event.SetString(GetValue()); if (GetEventHandler()->ProcessEvent(event)) return; } diff --git a/src/gtk1/textctrl.cpp b/src/gtk1/textctrl.cpp index 0f8df9de99..b0e2ef148a 100644 --- a/src/gtk1/textctrl.cpp +++ b/src/gtk1/textctrl.cpp @@ -614,7 +614,7 @@ bool wxTextCtrl::Enable( bool enable ) // nothing to do return FALSE; } - + if (m_windowStyle & wxTE_MULTILINE) { gtk_text_set_editable( GTK_TEXT(m_text), enable ); @@ -812,6 +812,7 @@ void wxTextCtrl::OnChar( wxKeyEvent &key_event ) { wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); event.SetEventObject(this); + event.SetString(GetValue()); if (GetEventHandler()->ProcessEvent(event)) return; } diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 8d1c44c0cc..f1509bef93 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -891,6 +891,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) { wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); InitCommandEvent(event); + event.SetString(GetValue()); if ( GetEventHandler()->ProcessEvent(event) ) return; }