Make default keyboard handling available in wxVarScrollHelperEvtHandler too.
Factor out the keyboard handling code in wxAnyScrollHelperBase allowing its reuse in wxVarScrollHelperEvtHandler. Now wxVarScrollHelperBase handles cursor keys in a sane way by default too and also allows disabling their handling, just as wxScrolledWindow. See #15357. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -142,6 +142,16 @@ bool wxVarScrollHelperEvtHandler::ProcessEvent(wxEvent& event)
|
||||
m_scrollHelper->HandleOnMouseWheel((wxMouseEvent &)event);
|
||||
}
|
||||
#endif // wxUSE_MOUSEWHEEL
|
||||
else if ( evType == wxEVT_CHAR &&
|
||||
(m_scrollHelper->GetOrientation() == wxVERTICAL) )
|
||||
{
|
||||
m_scrollHelper->HandleOnChar((wxKeyEvent &)event);
|
||||
if ( !event.GetSkipped() )
|
||||
{
|
||||
processed = true;
|
||||
wasSkipped = false;
|
||||
}
|
||||
}
|
||||
|
||||
event.Skip(wasSkipped);
|
||||
|
||||
|
Reference in New Issue
Block a user