Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 372
Haradzieniec Avatar asked May 07 '13 12:05

Haradzieniec


1 Answers

Use isVisible():

Returns true if this component is visible.

like image 150
CD.. Avatar answered Sep 21 '22 01:09

CD..