EVT_LIST_SET_INFO(LIST_CTRL, MyListCtrl::OnSetInfo)
EVT_LIST_ITEM_SELECTED(LIST_CTRL, MyListCtrl::OnSelected)
EVT_LIST_ITEM_DESELECTED(LIST_CTRL, MyListCtrl::OnDeselected)
- EVT_LIST_KEY_DOWN(LIST_CTRL, MyListCtrl::OnKeyDown)
+ EVT_LIST_KEY_DOWN(LIST_CTRL, MyListCtrl::OnListKeyDown)
+ EVT_LIST_ITEM_ACTIVATED(LIST_CTRL, MyListCtrl::OnActivated)
END_EVENT_TABLE()
IMPLEMENT_APP(MyApp)
text->WriteText("OnDeleteItem\n");
}
-void MyListCtrl::OnGetInfo(wxListEvent& event)
+void MyListCtrl::OnGetInfo(wxListEvent& /*event*/)
{
if ( !wxGetApp().GetTopWindow() )
return;
text->WriteText("OnDeselected\n");
}
-void MyListCtrl::OnKeyDown(wxListEvent& WXUNUSED(event))
+void MyListCtrl::OnActivated(wxListEvent& WXUNUSED(event))
{
if ( !wxGetApp().GetTopWindow() )
return;
if ( !text )
return;
- text->WriteText("OnKeyDown\n");
+ text->WriteText("OnActivated\n");
}
+void MyListCtrl::OnListKeyDown(wxListEvent& WXUNUSED(event))
+{
+ if ( !wxGetApp().GetTopWindow() )
+ return;
+
+ wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow;
+ if ( !text )
+ return;
+
+ text->WriteText("OnListKeyDown\n");
+}
+
+