Hi All, I'm newbie in dojo. I have created TabContainer programmatically based on dojotoolkit tutorial.
here is the code
require(["dijit/layout/TabContainer", "dijit/layout/ContentPane","dojo/dom", "dojo/domReady!"],
function(TabContainer, ContentPane,dom){
var tc = new TabContainer({
style: "height: 100%; width: 100%;"
}, "layerPanel");
var layerlistMenu = new ContentPane({
title: "Layer",
content: "this is layer list"
});
tc.addChild(layerlistMenu);
var legendMenu = new ContentPane({
title: "Legend",
content: "this is legend"
});
tc.addChild(legendMenu);
tc.startup();
});here is the actual result, the content is harcoded.

I have legend variable in another script like this :
var legend = new Legend ({
map: map
}, "legendDiv");
legend.startup();I want to assign the legend content to legend tab.
here is my expectation :

I did it using declarative method, could anyone please advice me how to assign legend content using programmatically method ?
thank you
-amri-
Just as you use the "addChild" to add the ContentPane to the TabContainer, you add information to the ContentPane with "addChild"
legendMenu.addChild(legend);