]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/scrolbar.cpp
Now its possible to run wxHTML without wxSockets
[wxWidgets.git] / src / gtk1 / scrolbar.cpp
index 84a46924ef5b7a25660dd5b5af322dc0f2d7a137..56cc1d6d5830045d23c8bdecf157f491de83ed05 100644 (file)
@@ -13,6 +13,9 @@
 #endif
 
 #include "wx/scrolbar.h"
+
+#if wxUSE_SCROLLBAR
+
 #include "wx/utils.h"
 #include <math.h>
 
@@ -134,9 +137,12 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
     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;
 
@@ -307,3 +313,4 @@ void wxScrollBar::ApplyWidgetStyle()
     gtk_widget_set_style( m_widget, m_widgetStyle );
 }
 
+#endif