- *text << "Value of the 2nd field of the selected item: "
- << info.m_text << '\n';
- }
- else
- {
- wxFAIL_MSG("wxListCtrl::GetItem() failed");
+ wxListItem info;
+ 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: "
+ << info.m_text << '\n';
+ }
+ else
+ {
+ wxFAIL_MSG("wxListCtrl::GetItem() failed");
+ }