corrected event type for standalone scrollbars (patch 1240385)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2005-07-28 21:38:46 +00:00
parent 2b3c87952d
commit 93c96bab3d
2 changed files with 12 additions and 6 deletions

View File

@ -36,7 +36,7 @@ wxOS2
wxUniv:
- Window creation now honours wxVSCROLL.
- Standalone scrollbars generate events of correct type (Jochen Roemmler)
2.6.1
-----

View File

@ -554,12 +554,18 @@ bool wxScrollBar::PerformAction(const wxControlAction& action,
// NB: we assume that scrollbar events are sequentially numbered
// but this should be ok as other code relies on this as well
scrollType += wxEVT_SCROLL_TOP - wxEVT_SCROLLWIN_TOP;
wxScrollEvent event(scrollType, this->GetId(), m_thumbPos,
IsVertical() ? wxVERTICAL : wxHORIZONTAL);
event.SetEventObject(this);
GetParent()->GetEventHandler()->ProcessEvent(event);
}
else // part of the window
{
wxScrollWinEvent event(scrollType, m_thumbPos,
IsVertical() ? wxVERTICAL : wxHORIZONTAL);
event.SetEventObject(this);
GetParent()->GetEventHandler()->ProcessEvent(event);
}
wxScrollWinEvent event(scrollType, m_thumbPos,
IsVertical() ? wxVERTICAL : wxHORIZONTAL);
event.SetEventObject(this);
GetParent()->GetEventHandler()->ProcessEvent(event);
}
return true;