title: inserting dijit content pane in dijit layout TitlePane programmatically
body: <p><a href="https://i.stack.imgur.com/id7f1.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/id7f1.jpg" alt="enter image description here"></a>I'm trying to add a dijit/layout/ content pane to a dijit/title pane programmatically.  The problem I'm having is that I cant get the content pane to go inside the title pane, it gets placed below it.  My code is this:
  any ideas what I'm doing wrong?</p>
  
  <p>Thanks</p>
  
  <p>Pete</p>
  
  <pre><code>[![require(\[
              "dijit/TitlePane",
              "dijit/layout/ContentPane",
              "dojo/dom",
              "dojo/domReady!"
          \], function (TitlePane, ContentPane, dom) {
  
              //create the title pane to hold the layer list
              var tp = new TitlePane({ title: "Layers", id: "tp" });
              dom.byId("viewDiv").appendChild(tp.domNode);
              tp.startup();
  
              var cp = new ContentPane({ id: "cp", content: "Test" });
              cp.placeAt("tp");
              cp.startup();
              dom.byId("tp").appendChild(cp.domNode);
  
          });][1]][1]
  </code></pre>