scrolling with kbd generates scroll events too

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-07-09 12:23:53 +00:00
parent 05dcbb8e9e
commit 39c869a6cd
3 changed files with 113 additions and 50 deletions

View File

@@ -809,6 +809,9 @@ void wxScrollHelper::HandleOnChar(wxKeyEvent& event)
szy = -1;
}
int xScrollOld = m_xScrollPosition,
yScrollOld = m_yScrollPosition;
int dsty;
switch ( event.KeyCode() )
{
@@ -851,6 +854,22 @@ void wxScrollHelper::HandleOnChar(wxKeyEvent& event)
// not for us
event.Skip();
}
if ( m_xScrollPosition != xScrollOld )
{
wxScrollWinEvent event(wxEVT_SCROLLWIN_THUMBTRACK, m_xScrollPosition,
wxHORIZONTAL);
event.SetEventObject(m_win);
m_win->GetEventHandler()->ProcessEvent(event);
}
if ( m_yScrollPosition != yScrollOld )
{
wxScrollWinEvent event(wxEVT_SCROLLWIN_THUMBTRACK, m_yScrollPosition,
wxVERTICAL);
event.SetEventObject(m_win);
m_win->GetEventHandler()->ProcessEvent(event);
}
}
// ----------------------------------------------------------------------------