From 7188bfcf6e3c33ef6e444775e8f30711a22860c8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 30 Mar 2000 18:21:18 +0000 Subject: [PATCH] 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 --- samples/listctrl/listtest.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/samples/listctrl/listtest.cpp b/samples/listctrl/listtest.cpp index 68bdf84300..1f01d46aa4 100644 --- a/samples/listctrl/listtest.cpp +++ b/samples/listctrl/listtest.cpp @@ -82,6 +82,8 @@ BEGIN_EVENT_TABLE(MyListCtrl, wxListCtrl) EVT_LIST_KEY_DOWN(LIST_CTRL, MyListCtrl::OnListKeyDown) EVT_LIST_ITEM_ACTIVATED(LIST_CTRL, MyListCtrl::OnActivated) EVT_LIST_COL_CLICK(LIST_CTRL, MyListCtrl::OnColClick) + + EVT_CHAR(MyListCtrl::OnChar) END_EVENT_TABLE() IMPLEMENT_APP(MyApp) @@ -579,6 +581,13 @@ void MyListCtrl::OnActivated(wxListEvent& event) void MyListCtrl::OnListKeyDown(wxListEvent& event) { 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)