#976 closed enhancement (fixed)
specify per tab whether or not there is close button
Reported by: | 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 15 years ago by
Component: | General → Widgets |
---|---|
Summary: | Can tabPanes have individual close buttons? → specify per tab whether or not there is close button |
comment:2 Changed 15 years ago by
Milestone: | → 0.4 |
---|---|
Owner: | changed from anonymous to morris |
comment:3 Changed 15 years ago by
Component: | Widgets → Wiki |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:4 Changed 15 years ago by
Component: | Wiki → Widgets |
---|
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