]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_split.cpp
added vendor display name (for consistency with app display name &c) (patch 1831303)
[wxWidgets.git] / src / xrc / xh_split.cpp
index f1dc8312461ab513580ddb88cf9abe5c9ac9fa41..fd219118089c2eb66f37ec5e7bd899e62910b6d7 100644 (file)
@@ -15,7 +15,7 @@
     #pragma hdrstop
 #endif
 
     #pragma hdrstop
 #endif
 
-#if wxUSE_XRC
+#if wxUSE_XRC && wxUSE_SPLITTER
 
 #include "wx/xrc/xh_split.h"
 
 
 #include "wx/xrc/xh_split.h"
 
@@ -57,8 +57,11 @@ wxObject *wxSplitterWindowXmlHandler::DoCreateResource()
 
     long sashpos = GetLong(wxT("sashpos"), 0);
     long minpanesize = GetLong(wxT("minsize"), -1);
 
     long sashpos = GetLong(wxT("sashpos"), 0);
     long minpanesize = GetLong(wxT("minsize"), -1);
+    float gravity = GetFloat(wxT("gravity"), 0.0);
     if (minpanesize != -1)
     if (minpanesize != -1)
-         splitter->SetMinimumPaneSize(minpanesize);
+        splitter->SetMinimumPaneSize(minpanesize);
+    if (gravity != 0.0)
+        splitter->SetSashGravity(gravity);
 
     wxWindow *win1 = NULL, *win2 = NULL;
     wxXmlNode *n = m_node->GetChildren();
 
     wxWindow *win1 = NULL, *win2 = NULL;
     wxXmlNode *n = m_node->GetChildren();
@@ -107,4 +110,4 @@ bool wxSplitterWindowXmlHandler::CanHandle(wxXmlNode *node)
      return IsOfClass(node, wxT("wxSplitterWindow"));
 }
 
      return IsOfClass(node, wxT("wxSplitterWindow"));
 }
 
-#endif // wxUSE_XRC
+#endif // wxUSE_XRC && wxUSE_SPLITTER