Allow user code to override key events in generic wxListCtrl.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 11 Jul 2010 10:43:35 +0000 (10:43 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 11 Jul 2010 10:43:35 +0000 (10:43 +0000)
commitd6a658ff0cd928953efdaf1ea56ff04b9cf281c1
tree328d79374863cb4564999d4352e43588a24bbee5
parent6794ca461c36683a4d3e5118c113317d1c0f3f8b
Allow user code to override key events in generic wxListCtrl.

The changes of r58323 ("Restore keyboard navi") fixed the handling of cursor
keys in the generic wxListCtrl implementation but at the price of not sending
keyboard events for the cursor keys to wxListCtrl itself any more. This made
it impossible to override their handling in user code, something that used to
work in previous wx versions and still works in wxMSW.

Revert the changes of this revision now and fix the original code by simply
disabling the handling of the cursor keys in wxScrollHelperBase using a newly
added DisableKeyboardScrolling() method. This ensures that the keyboard events
for cursor keys are not used to scroll the window when they are forwarded to
wxListCtrl from wxListMainWindow.

The fix is conceptually ugly as it would be better to avoid the need for such
ad hoc functions as DisableKeyboardScrolling() but it is very simple and there
just doesn't seem to be any sane way to do it otherwise with wxScrollHelperBase.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64877 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/scrolwin.h
interface/wx/scrolwin.h
src/generic/listctrl.cpp
src/generic/scrlwing.cpp