]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_split.cpp
orderBack puts it behind all windows in its level, including in other apps, so use...
[wxWidgets.git] / src / xrc / xh_split.cpp
index be23b871f5dbf5e8e32b2761d0da5e9362c4a4b4..e14300f4f9679a14068a7e8b7425cc718b4148d4 100644 (file)
@@ -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();
@@ -84,7 +87,7 @@ wxObject *wxSplitterWindowXmlHandler::DoCreateResource()
     }
 
     if (win1 == NULL)
     }
 
     if (win1 == NULL)
-        wxLogError(wxT("wxSplitterWindow node must contain at least one window."));
+        ReportError("wxSplitterWindow node must contain at least one window");
 
     bool horizontal = (GetParamValue(wxT("orientation")) != wxT("vertical"));
     if (win1 && win2)
 
     bool horizontal = (GetParamValue(wxT("orientation")) != wxT("vertical"));
     if (win1 && win2)