Haradzieniec
Haradzieniec

Reputation: 9340

Check if element is hidden in ExtJS

I can do

if( !Ext.getCmp('myElem'))

to check whether the element exist and

Ext.getCmp('myElem').hide();

or

Ext.getCmp('myElem').show(); 

to hide or show the element.

But, how to check if the element is hidden?

if (Ext.getCmp('myElem') && <*hidden*>){//???
     //do something
}

Browsing SO didn't help me to find an answer.

Thank you.

Upvotes: 6

Views: 10104

Answers (1)

CD..
CD..

Reputation: 74126

Use isVisible():

Returns true if this component is visible.

Upvotes: 9

Related Questions