In my application the tab container renders correctly, the tabs appear correctly....but
the content for Tab 1 doesn't appear until I've clicked another tab and then returned to Tab 1.
Any idea as to why this would happen?
Solved! Go to Solution.
Try calling .startup() on the TabContainer either after creating it or after adding the content panes
tabs.startup();
What is the content you're putting into your tab container? Can you show your code?
Here's the code for the getWindowContent function
function getWindowContent(graphic) {
//make a tab container
var tabs = new dijit.layout.TabContainer({
useMenu: false,
useSlider:false,
}, dojo.create("div999"));
//add content panes - these are the tabs
var cp1 = new dijit.layout.ContentPane({
title: "Overview",
content: "Content Goes Here1",
});
var cp2 = new dijit.layout.ContentPane({
title: "Details",
content: "Content Goes Here2",
});
var cp3 = new dijit.layout.ContentPane({
title: "Schedule",
content: "Content Goes Here3",
});
tabs.addChild(cp1);
tabs.addChild(cp2);
tabs.addChild(cp3);
return tabs.domNode;
};
Try calling .startup() on the TabContainer either after creating it or after adding the content panes
tabs.startup();
This suggestion led me to a fix.
I needed to add dojo.body as shown here
dojo.create("div",{style:{}},dojo.body()));