tests for key/char events

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-03-30 18:21:18 +00:00
parent abb5e0c057
commit 7188bfcf6e

View File

@@ -82,6 +82,8 @@ BEGIN_EVENT_TABLE(MyListCtrl, wxListCtrl)
EVT_LIST_KEY_DOWN(LIST_CTRL, MyListCtrl::OnListKeyDown) EVT_LIST_KEY_DOWN(LIST_CTRL, MyListCtrl::OnListKeyDown)
EVT_LIST_ITEM_ACTIVATED(LIST_CTRL, MyListCtrl::OnActivated) EVT_LIST_ITEM_ACTIVATED(LIST_CTRL, MyListCtrl::OnActivated)
EVT_LIST_COL_CLICK(LIST_CTRL, MyListCtrl::OnColClick) EVT_LIST_COL_CLICK(LIST_CTRL, MyListCtrl::OnColClick)
EVT_CHAR(MyListCtrl::OnChar)
END_EVENT_TABLE() END_EVENT_TABLE()
IMPLEMENT_APP(MyApp) IMPLEMENT_APP(MyApp)
@@ -579,6 +581,13 @@ void MyListCtrl::OnActivated(wxListEvent& event)
void MyListCtrl::OnListKeyDown(wxListEvent& event) void MyListCtrl::OnListKeyDown(wxListEvent& event)
{ {
LogEvent(event, _T("OnListKeyDown")); LogEvent(event, _T("OnListKeyDown"));
event.Skip();
}
void MyListCtrl::OnChar(wxKeyEvent& event)
{
wxLogMessage(_T("Got char event."));
} }
void MyListCtrl::LogEvent(const wxListEvent& event, const wxChar *eventName) void MyListCtrl::LogEvent(const wxListEvent& event, const wxChar *eventName)