From 51e247cc98b4a8d5ef4e2174c6b2d47e901267ba Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 19 Sep 2002 19:42:45 +0000 Subject: [PATCH] don't allow TABbing away from the list control while the label is being edited (fixes bug 555749) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/listctrl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 93a644aa27..a90cad1bc1 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -1284,6 +1284,12 @@ wxTextCtrl* wxListCtrl::EditLabel(long item, wxClassInfo* textControlClass) m_textCtrl->SubclassWin(hWnd); m_textCtrl->SetParent(this); + // we must disallow TABbing away from the control while the edit contol is + // shown because this leaves it in some strange state (just try removing + // this line and then pressing TAB while editing an item in listctrl + // inside a panel) + m_textCtrl->SetWindowStyle(m_textCtrl->GetWindowStyle() | wxTE_PROCESS_TAB); + return m_textCtrl; }