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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user