diff --git a/src/gtk/slider.cpp b/src/gtk/slider.cpp index 07bc86620d..9f59575679 100644 --- a/src/gtk/slider.cpp +++ b/src/gtk/slider.cpp @@ -131,11 +131,11 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) ); + GtkEnableEvents(); + SetRange( minValue, maxValue ); SetValue( value ); - GtkEnableEvents(); - m_parent->DoAddChild( this ); PostCreation(); diff --git a/src/gtk1/slider.cpp b/src/gtk1/slider.cpp index 07bc86620d..9f59575679 100644 --- a/src/gtk1/slider.cpp +++ b/src/gtk1/slider.cpp @@ -131,11 +131,11 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) ); + GtkEnableEvents(); + SetRange( minValue, maxValue ); SetValue( value ); - GtkEnableEvents(); - m_parent->DoAddChild( this ); PostCreation();