Test for IsScrolling() added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -44,6 +44,7 @@ public:
|
|||||||
void OnMoveButton( wxCommandEvent &event );
|
void OnMoveButton( wxCommandEvent &event );
|
||||||
void OnScrollWin( wxCommandEvent &event );
|
void OnScrollWin( wxCommandEvent &event );
|
||||||
void OnMouseDown( wxMouseEvent &event );
|
void OnMouseDown( wxMouseEvent &event );
|
||||||
|
void OnScroll( wxScrollWinEvent &event );
|
||||||
|
|
||||||
wxButton *m_button;
|
wxButton *m_button;
|
||||||
|
|
||||||
@@ -102,6 +103,7 @@ BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
|||||||
EVT_BUTTON( ID_DELBUTTON, MyCanvas::OnDeleteButton)
|
EVT_BUTTON( ID_DELBUTTON, MyCanvas::OnDeleteButton)
|
||||||
EVT_BUTTON( ID_MOVEBUTTON, MyCanvas::OnMoveButton)
|
EVT_BUTTON( ID_MOVEBUTTON, MyCanvas::OnMoveButton)
|
||||||
EVT_BUTTON( ID_SCROLLWIN, MyCanvas::OnScrollWin)
|
EVT_BUTTON( ID_SCROLLWIN, MyCanvas::OnScrollWin)
|
||||||
|
EVT_SCROLLWIN( MyCanvas::OnScroll)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id,
|
MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id,
|
||||||
@@ -250,6 +252,16 @@ void MyCanvas::OnScrollWin( wxCommandEvent &WXUNUSED(event) )
|
|||||||
Scroll( -1, y+2 );
|
Scroll( -1, y+2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MyCanvas::OnScroll( wxScrollWinEvent &event )
|
||||||
|
{
|
||||||
|
if (( event.GetEventType() == wxEVT_SCROLLWIN_THUMBTRACK ) &&
|
||||||
|
( !event.IsScrolling() ))
|
||||||
|
{
|
||||||
|
wxLogMessage( "Thumb released; position: %u", event.GetPosition() );
|
||||||
|
}
|
||||||
|
event.Skip();
|
||||||
|
}
|
||||||
|
|
||||||
// MyFrame
|
// MyFrame
|
||||||
|
|
||||||
const int ID_QUIT = 108;
|
const int ID_QUIT = 108;
|
||||||
|
Reference in New Issue
Block a user