Patch level : 10.0
Files correlati : xvaga.dll Ricompilazione Demo : [ ] Commento : Corretta gestione scrollbar+slider git-svn-id: svn://10.65.10.50/trunk@17096 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
06d78e1457
commit
c6ce62411c
@ -776,14 +776,11 @@ void TwxWindow::OnScroll(wxScrollEvent& evt)
|
|||||||
SCROLL_CONTROL sc = ConvertScrollToXVT(evt.GetEventType());
|
SCROLL_CONTROL sc = ConvertScrollToXVT(evt.GetEventType());
|
||||||
if (sc != SC_NONE)
|
if (sc != SC_NONE)
|
||||||
{
|
{
|
||||||
wxScrollBar* ctl = wxStaticCast(evt.GetEventObject(), wxScrollBar);
|
|
||||||
const wxSize sz = ctl->GetSize();
|
|
||||||
|
|
||||||
EVENT e; memset(&e, 0, sizeof(EVENT));
|
EVENT e; memset(&e, 0, sizeof(EVENT));
|
||||||
e.type = E_CONTROL;
|
e.type = E_CONTROL;
|
||||||
e.v.ctl.id = evt.GetId();
|
e.v.ctl.id = evt.GetId();
|
||||||
e.v.ctl.ci.type = sz.x > sz.y ? WC_HSCROLL : WC_VSCROLL;
|
e.v.ctl.ci.type = evt.GetOrientation()==wxHORIZONTAL ? WC_HSCROLL : WC_VSCROLL;
|
||||||
e.v.ctl.ci.win = (WINDOW)ctl;
|
e.v.ctl.ci.win = (WINDOW)evt.GetEventObject();
|
||||||
e.v.ctl.ci.v.scroll.pos = evt.GetPosition();
|
e.v.ctl.ci.v.scroll.pos = evt.GetPosition();
|
||||||
e.v.ctl.ci.v.scroll.what = sc;
|
e.v.ctl.ci.v.scroll.what = sc;
|
||||||
DoXvtEvent(e);
|
DoXvtEvent(e);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user