#endif
#include "wx/scrolbar.h"
+
+#if wxUSE_SCROLLBAR
+
#include "wx/utils.h"
#include <math.h>
m_needParent = TRUE;
m_acceptsFocus = TRUE;
- PreCreation( parent, id, pos, size, style, name );
-
- SetValidator( validator );
+ if (!PreCreation( parent, pos, size ) ||
+ !CreateBase( parent, id, pos, size, style, validator, name ))
+ {
+ wxFAIL_MSG( _T("wxScrollBar creation failed") );
+ return FALSE;
+ }
m_oldPos = 0.0;
- if (style & wxSB_VERTICAL == wxSB_VERTICAL)
- m_widget = gtk_hscrollbar_new( (GtkAdjustment *) NULL );
- else
+ if ((style & wxSB_VERTICAL) == wxSB_VERTICAL)
m_widget = gtk_vscrollbar_new( (GtkAdjustment *) NULL );
-
+ else
+ m_widget = gtk_hscrollbar_new( (GtkAdjustment *) NULL );
+
m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) );
gtk_signal_connect( GTK_OBJECT(m_adjust),
gtk_widget_set_style( m_widget, m_widgetStyle );
}
+#endif