Thanks for this code guys, just what I needed and works fine in I.E. However in Firefox the disabled tabs don't change appearance, I made this minor mod to fix this:
I added the folowing lines to set_enabled to add and remove the ajax_tab_disabled class from the header::
set_enabled : function(value) {
if (value != this._enabled) {
this._enabled = value;
if (value)
Sys.UI.DomElement.removeCssClass(this._header, "ajax__tab_disabled");
else
Sys.UI.DomElement.addCssClass(this._header, "ajax__tab_disabled");
if (this.get_isInitialized()) {
if (!this._enabled) {
this._hide();
} else {
this._show();
}
}
this.raisePropertyChanged("enabled");
}
}
Dr_Software
Member
7 Points
2 Posts
Re: How to set a Tab in a Tabcontainer to disabled (but visible)
Dec 03, 2007 11:12 PM|LINK
Hi,
Thanks for this code guys, just what I needed and works fine in I.E. However in Firefox the disabled tabs don't change appearance, I made this minor mod to fix this:
I added the folowing lines to set_enabled to add and remove the ajax_tab_disabled class from the header::
set_enabled : function(value) { if (value != this._enabled) { this._enabled = value; if (value) Sys.UI.DomElement.removeCssClass(this._header, "ajax__tab_disabled"); else Sys.UI.DomElement.addCssClass(this._header, "ajax__tab_disabled"); if (this.get_isInitialized()) { if (!this._enabled) { this._hide(); } else { this._show(); } } this.raisePropertyChanged("enabled"); } }Then I added the CSS class to the tabs.css:
DWC