PDA

View Full Version : Hiding content in GroupTabPanel



fsa3
1 Jul 2009, 5:00 PM
I have a group tab panel were some of the tab panels contain panels that use applyTo (so that I can render content that is also indexable by Google).


{
title: 'Top Locals',
tabtip: 'Top Locals',
style: 'padding: 10px;',
items: new Ext.Panel({
title: 'Top Locals',
collapsible:false,
applyTo: 'toplocals',
frame:'true'
})
}

What happens is that the HTML for the div 'toplocals' initially shows up at the bottom of the document, then when you click Top Locals it properly renders into the the tab panel. What is the recommended way to deal with this?

The idea I had was to make the top local div have "display:none" and then add an event handler so that when Top Local is clicked the div's display style is updated. However, I'd like to see if there is a simpler/better way.

Thanks!

fsa3
4 Jul 2009, 5:49 AM
Anyone have any thoughts on this? After a few days I feel like I'm missing something simple here.

Animal
4 Jul 2009, 6:06 AM
use contentEl, not applyTo

Animal
4 Jul 2009, 6:06 AM
The API docs clearly tell the difference: http://extjs.com/deploy/ext-3.0-rc3/docs/

fsa3
4 Jul 2009, 6:45 AM
Thanks - Regardless of using contentEl or applyTo, it seemed what was causing my problem was not having deferredRender set to false in the parent element.

The good news is I now understand the difference between contentEl and applyTo.

Thanks again.