Select to view content in your preferred language

Problems with InfoWindow TabContainer

4280
4
Jump to solution
01-21-2015 09:10 AM
BenCamp
Deactivated User

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?

0 Kudos
1 Solution

Accepted Solutions
JohnGrayson
Esri Regular Contributor

Try calling .startup() on the TabContainer either after creating it or after adding the content panes

tabs.startup();

View solution in original post

0 Kudos
4 Replies
KenBuja
MVP Esteemed Contributor

What is the content you're putting into your tab container? Can you show your code?

0 Kudos
BenCamp
Deactivated User

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;

};

0 Kudos
JohnGrayson
Esri Regular Contributor

Try calling .startup() on the TabContainer either after creating it or after adding the content panes

tabs.startup();

0 Kudos
BenCamp
Deactivated User

This suggestion led me to a fix.

I needed to add dojo.body as shown here

dojo.create("div",{style:{}},dojo.body()));