]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/treectrl.cpp
always let the multiline text control process the Enter key presses
[wxWidgets.git] / src / msw / treectrl.cpp
index 5628353b4b2ed7e391d62c25aaab4b7b51326bcb..b45e904d28e92aff33ce31b6d4a01eb342e740a2 100644 (file)
@@ -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;
 }