From a37f9c6db4098abd6e2a4b1f356446554c938a99 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 12 Apr 2002 22:27:37 +0000 Subject: [PATCH] always handle Enter ourselves while editing tree ctrl labels git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15119 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/treectrl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index 5628353b4b..b45e904d28 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -1824,6 +1824,12 @@ wxTextCtrl* wxTreeCtrl::EditLabel(const wxTreeItemId& item, m_textCtrl->SetHWND((WXHWND)hWnd); m_textCtrl->SubclassWin((WXHWND)hWnd); + // set wxTE_PROCESS_ENTER style for the text control to force it to process + // the Enter presses itself, otherwise they could be stolen from it by the + // dialog navigation code + m_textCtrl-> + SetWindowStyle(m_textCtrl->GetWindowStyle() | wxTE_PROCESS_ENTER); + return m_textCtrl; }