ensure that GetEditControl() returns something even if label editing was started by the user and not the program (closes #1325)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53831 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-05-30 00:26:07 +00:00
parent 5cd4cb75ee
commit 508b652335
3 changed files with 65 additions and 17 deletions

View File

@@ -830,6 +830,16 @@ void MyListCtrl::OnBeginRDrag(wxListEvent& event)
void MyListCtrl::OnBeginLabelEdit(wxListEvent& event)
{
wxLogMessage( wxT("OnBeginLabelEdit: %s"), event.m_item.m_text.c_str());
wxTextCtrl * const text = GetEditControl();
if ( !text )
{
wxLogMessage("BUG: started to edit but no edit control");
}
else
{
wxLogMessage("Edit control value: \"%s\"", text->GetValue());
}
}
void MyListCtrl::OnEndLabelEdit(wxListEvent& event)