From: Guillermo Rodriguez Garcia Date: Tue, 18 Jan 2000 20:23:38 +0000 (+0000) Subject: Test for IsScrolling() added X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/6ab6a43579f5e42d4905beef34893c3e7f5253ab Test for IsScrolling() added git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/scroll/scroll.cpp b/samples/scroll/scroll.cpp index 8f5cba310c..e612f23c76 100644 --- a/samples/scroll/scroll.cpp +++ b/samples/scroll/scroll.cpp @@ -44,6 +44,7 @@ public: void OnMoveButton( wxCommandEvent &event ); void OnScrollWin( wxCommandEvent &event ); void OnMouseDown( wxMouseEvent &event ); + void OnScroll( wxScrollWinEvent &event ); wxButton *m_button; @@ -102,6 +103,7 @@ BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow) EVT_BUTTON( ID_DELBUTTON, MyCanvas::OnDeleteButton) EVT_BUTTON( ID_MOVEBUTTON, MyCanvas::OnMoveButton) EVT_BUTTON( ID_SCROLLWIN, MyCanvas::OnScrollWin) + EVT_SCROLLWIN( MyCanvas::OnScroll) END_EVENT_TABLE() MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id, @@ -250,6 +252,16 @@ void MyCanvas::OnScrollWin( wxCommandEvent &WXUNUSED(event) ) 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 const int ID_QUIT = 108;