From 06cdbdacb2f7c404fd7572ad6fa286d605832cb3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 13 Oct 2002 12:05:57 +0000 Subject: [PATCH] clarifications of ENDSCROLL event docs (patch 622424) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17509 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/scrolevt.inc | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/docs/latex/wx/scrolevt.inc b/docs/latex/wx/scrolevt.inc index 90d5758865..f22f1cf5b1 100644 --- a/docs/latex/wx/scrolevt.inc +++ b/docs/latex/wx/scrolevt.inc @@ -5,9 +5,9 @@ member functions that take a wxScrollEvent argument. You can use {\tt EVT\_COMMAND\_SCROLL...} macros with window IDs for when intercepting scroll events from controls, or {\tt EVT\_SCROLL...} macros without window IDs for intercepting scroll events from the receiving window - except for this, -the macros behave exactly the same +the macros behave exactly the same. -\twocolwidtha{7cm} +\twocolwidtha{9cm} \begin{twocollist}\itemsep=0pt \twocolitem{{\bf EVT\_SCROLL(func)}}{Process all scroll events.} \twocolitem{{\bf EVT\_SCROLL\_TOP(func)}}{Process wxEVT\_SCROLL\_TOP scroll-to-top events (minium position).} @@ -34,3 +34,22 @@ sent as the user drags the thumbtrack).} \end{twocollist}% + +\wxheading{The difference between {\tt EVT_SCROLL_THUMBRELEASE} and {\tt EVT_SCROLL_ENDSCROLL}} + +The {\tt EVT_SCROLL_THUMBRELEASE} event is only emitted when actually dragging +the thumb using the mouse and releasing it (This {\tt EVT_SCROLL_THUMBRELEASE} +event is also followed by an {\tt EVT_SCROLL_ENDSCROLL} event). + +The {\tt EVT_SCROLL_ENDSCROLL} event also occurs when using the keyboard to +change the thumb position, and when clicking next to the thumb (In all these +cases the {\tt EVT_SCROLL_THUMBRELEASE} event does not happen). + +In short, the {\tt EVT_SCROLL_ENDSCROLL} event is triggered when scrolling/ +moving has finished. The only exception (unfortunately) is that changing the +thumb position using the mousewheel does give a {\tt EVT_SCROLL_THUMBRELEASE} +event but NOT an {\tt EVT_SCROLL_ENDSCROLL} event. + +Please see the widgets sample ("Slider" page) to see the difference +between {\tt EVT_SCROLL_THUMBRELEASE} and {\tt EVT_SCROLL_ENDSCROLL} in action. +