From: Václav Slavík Date: Thu, 10 May 2001 16:41:47 +0000 (+0000) Subject: fixed wxListCtrl::EditLabel for MSW (ListView_EditLabel fails if X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/aa50e893ee119e4c66414d7f194d89a3d9a23819 fixed wxListCtrl::EditLabel for MSW (ListView_EditLabel fails if the control does not have focus, so I changed EditLabel to always set focus to *this before calling LV_EditLabel). This fixes wxEditableListBox. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 6f8fe1c01a..633cc77ce8 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -1049,6 +1049,8 @@ wxTextCtrl* wxListCtrl::EditLabel(long item, wxClassInfo* textControlClass) { wxASSERT( (textControlClass->IsKindOf(CLASSINFO(wxTextCtrl))) ); + // VS: ListView_EditLabel requires that the list has focus. + SetFocus(); HWND hWnd = (HWND) ListView_EditLabel(GetHwnd(), item); if (m_textCtrl)