From: Vadim Zeitlin Date: Sat, 24 Dec 2005 02:55:03 +0000 (+0000) Subject: also generate wxEVT_SCROLL_CHANGED as under wxMSW X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8e3e14c4871f6c3b783eb12989262e076845c8e3 also generate wxEVT_SCROLL_CHANGED as under wxMSW git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/docs/changes.txt b/docs/changes.txt index 8474299b82..22546af7c1 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -53,6 +53,7 @@ wxGTK: - wxEVT_MENU_CLOSE and wxEVT_MENU_OPENED for popup menus are now generated - Implemented wxCURSOR_BLANK support +- wxSlider generates all scroll events now and not only wxEVT_SCROLL_THUMBTRACK - Fixed problem with choice editor in wxGrid whereby the editor lost focus when the combobox menu was shown. - Fixed problem trying to print from a preview, whereby wrong printer diff --git a/src/gtk/slider.cpp b/src/gtk/slider.cpp index b4e9701b1b..ba70dee257 100644 --- a/src/gtk/slider.cpp +++ b/src/gtk/slider.cpp @@ -60,6 +60,13 @@ ProcessScrollEvent(wxSlider *win, wxEventType evtType, double dvalue) event.SetEventObject( win ); win->GetEventHandler()->ProcessEvent( event ); + if ( evtType != wxEVT_SCROLL_THUMBTRACK ) + { + wxScrollEvent event2(wxEVT_SCROLL_CHANGED, win->GetId(), value, orient); + event2.SetEventObject( win ); + win->GetEventHandler()->ProcessEvent( event2 ); + } + wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, win->GetId() ); cevent.SetEventObject( win ); cevent.SetInt( value ); diff --git a/src/gtk1/slider.cpp b/src/gtk1/slider.cpp index b4e9701b1b..ba70dee257 100644 --- a/src/gtk1/slider.cpp +++ b/src/gtk1/slider.cpp @@ -60,6 +60,13 @@ ProcessScrollEvent(wxSlider *win, wxEventType evtType, double dvalue) event.SetEventObject( win ); win->GetEventHandler()->ProcessEvent( event ); + if ( evtType != wxEVT_SCROLL_THUMBTRACK ) + { + wxScrollEvent event2(wxEVT_SCROLL_CHANGED, win->GetId(), value, orient); + event2.SetEventObject( win ); + win->GetEventHandler()->ProcessEvent( event2 ); + } + wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, win->GetId() ); cevent.SetEventObject( win ); cevent.SetInt( value );