Vlad
Vlad

Reputation: 2773

How to change css class of extjs container

I have this extjs container

    var cont = Ext.create('Ext.container.Container',{
        cls: 'myClass1',
        id: myId,
        flex: 1
    });

How can I change the cls property to 'MyClass2' at run time with javascript/extjs code?

Upvotes: 3

Views: 9074

Answers (1)

Wilk
Wilk

Reputation: 8123

If SENSE.ui.createContainer make an Ext.container.Container base class, then you can use removeCls method, as follows:

cont.removeCls ('MyClass1');

For more info: Ext.container.Container.removeCls

Upvotes: 4

Related Questions