assert in OnSelected() fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4594 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -491,18 +491,21 @@ void MyListCtrl::OnSelected(wxListEvent& event)
|
|||||||
if ( !text )
|
if ( !text )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wxListItem info;
|
if ( GetWindowStyle() & wxLC_REPORT )
|
||||||
info.m_itemId = event.m_itemIndex;
|
|
||||||
info.m_col = 1;
|
|
||||||
info.m_mask = wxLIST_MASK_TEXT;
|
|
||||||
if ( GetItem(info) )
|
|
||||||
{
|
{
|
||||||
*text << "Value of the 2nd field of the selected item: "
|
wxListItem info;
|
||||||
<< info.m_text << '\n';
|
info.m_itemId = event.m_itemIndex;
|
||||||
}
|
info.m_col = 1;
|
||||||
else
|
info.m_mask = wxLIST_MASK_TEXT;
|
||||||
{
|
if ( GetItem(info) )
|
||||||
wxFAIL_MSG("wxListCtrl::GetItem() failed");
|
{
|
||||||
|
*text << "Value of the 2nd field of the selected item: "
|
||||||
|
<< info.m_text << '\n';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
wxFAIL_MSG("wxListCtrl::GetItem() failed");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
text->WriteText("OnSelected\n");
|
text->WriteText("OnSelected\n");
|
||||||
|
Reference in New Issue
Block a user