title: dojo/dijit BorderContainer declarative example - but programmatic
body: <p>I'm trying to write the declarative example in a programmatic way, but so far no success.
  <a href="http://dojotoolkit.org/reference-guide/dijit/layout/BorderContainer.html" rel="nofollow">http://dojotoolkit.org/reference-guide/dijit/layout/BorderContainer.html</a></p>
  
  <pre><code>dojo.require("dijit.layout.ContentPane");
  dojo.require("dijit.layout.BorderContainer");
  
  dojo.addOnLoad(function() {
  
      var borderContainer = new dijit.layout.BorderContainer({
          design: "sidebar",
          gutters: true,
          liveSplitters: true,
          id: "borderContainer"
      });
  
     borderContainer.placeAt(dojo.body(), "last");
  
      var panelLeft = new dijit.layout.ContentPane({
          content: "&lt;p&gt;left&lt;/p&gt;",
          splitter: true,
          region: "leading",
          style: "width: 300px;"
      });
      panelLeft.placeAt("borderContainer", "first");
  
      var panelRight = new dijit.layout.ContentPane({
          content: "&lt;p&gt;right&lt;/p&gt;",
          splitter: true,
          region: "center"
      });
      panelRight.placeAt("borderContainer", "last");
  
  });
  </code></pre>
  
  <p>CSS file: <code>#borderContainer { width: 100%; height: 100%; }</code></p>
  
  <p>You can see the code here: <a href="http://jsbin.com/inulig/27/edit#source" rel="nofollow">http://jsbin.com/inulig/27/edit#source</a></p>
  
  <p>Thanks!</p>