]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_scwin.cpp
Fix another crash when conversion fails in Unix PostScript code.
[wxWidgets.git] / src / xrc / xh_scwin.cpp
index f205a72b7b146340574be65cba4aaead303585cf..d385f3e323e4d70b1671092d6041d6c166b1e969 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     XRC resource for wxScrolledWindow
 // Author:      Vaclav Slavik
 // Created:     2002/10/18
-// RCS-ID:      $Id$
 // Copyright:   (c) 2002 Vaclav Slavik
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef WX_PRECOMP
     #include "wx/frame.h"
+    #include "wx/scrolwin.h"
 #endif
 
-#include "wx/scrolwin.h"
-
 IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindowXmlHandler, wxXmlResourceHandler)
 
 wxScrolledWindowXmlHandler::wxScrolledWindowXmlHandler()
@@ -56,6 +54,12 @@ wxObject *wxScrolledWindowXmlHandler::DoCreateResource()
     SetupWindow(control);
     CreateChildren(control);
 
+    if ( HasParam(wxT("scrollrate")) )
+    {
+        wxSize rate = GetSize(wxT("scrollrate"));
+        control->SetScrollRate(rate.x, rate.y);
+    }
+
     return control;
 }