PDA

View Full Version : How to disable a Tab in TabPanel?



supermonchi
18 Apr 2011, 4:50 AM
I want to show a TabPanel with only the first Tab being enabled, the others are supposed to be disabled or greyed out.

I tried this:

var productsTab = new Ext.Tab({
title: 'Products Selection',
id: 'products_card',
disabled: true
});within the TabPanel initComponent function but it strangely still appears enabled.

I then tried this from Chrome Console

BookingRequest.views.viewport.getComponent('products_card').tab.disable();It works, which is great. But when I put it in the initComponent function I got an error:

Uncaught TypeError: Cannot call method 'getComponent' of undefinedWhat am I missing here?

Thanks.

strad84
5 Dec 2011, 2:05 AM
Up !! I have the same problem !!!