View Full Version : Clsoe button for tabs in titleless region?

3 Jan 2007, 8:10 AM

If I want to have closable tabs in a layoutregion but no titlebar, is this possible, and how.

When I remove the titlebar ther is no close button anywhere and to have the titlebar above the tabs looks very wrong to me.

Best would be if the close button was rendered to the far right of the tabs as in firefox 1.5 as that should be quite familiar to many users.

An alternative whould be to have in tab close buttons but that is wasting a lot of space.

3 Jan 2007, 8:28 AM

4 Jan 2007, 12:19 AM
I tried to add it to both layout declaration and to set it in script but no close button appears.

My test page is:

This is the declaration for center
center: {
/*titlebar: true,*/
tabPosition: 'top',
closeOnTabs: true

And this is my load script


layout.add('north', new YAHOO.ext.ContentPanel('north', 'North'));
layout.add('west', new YAHOO.ext.ContentPanel('west'));
layout.add('east', new YAHOO.ext.ContentPanel('east1', {title: 'East'}));
layout.add('center', new YAHOO.ext.ContentPanel('center1', {title: 'Close Me', closable: true}));
layout.add('center', new YAHOO.ext.ContentPanel('center2', {title: 'Center Panel', closable: false}));

layout.getRegion('center').closeOnTabs = true;


Also, the suggested solution is only the second best alternative, does any one know of a way to get the primary way to work?

4 Jan 2007, 12:47 AM
What you have should work! You should get an "x" button on your tab! I don't know why it's not working now.

4 Jan 2007, 8:39 AM
It looks like you're still using RC3 - I suggest you upgrade to the official release as this may have been fixed.

5 Jan 2007, 2:28 PM
I have exactly the same issue and am using the latest code from svn/trunk. Is this a bug?

5 Jan 2007, 2:57 PM
It's closeonTab, not closeonTabs.

5 Jan 2007, 7:44 PM
thanx, that was it. guess we need to change that in the docs. :)


6 Jan 2007, 6:50 AM
Whoops, sorry about that.