PDA

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



dmartensson
3 Jan 2007, 8:10 AM
Hi,

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.

Animal
3 Jan 2007, 8:28 AM
http://www.yui-ext.com/playpen/yui-ext.0.40/docs/output/YAHOO.ext.LayoutRegion.html#config-closeOnTabs

dmartensson
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: http://213.115.215.156/EP30/index.htm


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

And this is my load script


layout.beginUpdate();

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;

layout.endUpdate();

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

Animal
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.

tryanDLS
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.

lstroud
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?

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

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

LES

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