Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#976 closed enhancement (fixed)

specify per tab whether or not there is close button

Reported by: andy@… Owned by: morris
Priority: high Milestone:
Component: Widgets Version: 0.3
Keywords: Cc:
Blocked By: Blocking:

Description

It would be helpful if it were possible to choose whether individual tabPanes had close buttons, rather than the current system where you either have all or no tabs being closeable. I need this for a site I'm working on where I have two tabs which are always open, and others which are brought up dynamically and which I want the user to be able to close. I've found my own way of patching the code to allow this, but it would be better for me if something like this was included in the next release. I'm not sure if I can post my patch without having to sign your disclaimer form, but here it is anyway:

in TabContainer?.js, change the following lines in _setupTab from:

dojo.html.disableSelection(span);

if (this.closeButton=="tab") {

var img = document.createElement("div");

to:

dojo.html.disableSelection(span);

if (this.closeButton=="tab"
tab.closeButton=="tab") {

var img = document.createElement("div");

This lets you add a closeButton property to the ContentPane? for the individual tab.

Change History (5)

comment:1 Changed 13 years ago by bill

Component: GeneralWidgets
Summary: Can tabPanes have individual close buttons?specify per tab whether or not there is close button

comment:2 Changed 13 years ago by morris

Milestone: 0.4
Owner: changed from anonymous to morris

Added this feature in #4598.

Use tabCloseButton="true" on each sub-widget for a tabContainer to enable a close button for that tab. closeButton was not used for the attribute name (because a tabcontainer within tabcontainer means you can't reuse that attribute name for two different purposes.)

See example in test_TabContainer_noLayout.html

comment:3 Changed 13 years ago by guest

Component: WidgetsWiki
Resolution: fixed
Status: newclosed

comment:4 Changed 13 years ago by guest

Component: WikiWidgets

comment:5 Changed 12 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.