Kiran
Kiran

Reputation: 20313

getInnerHeight and getInnerWidth in ExtJS4

We are using getInnerHeight and getInnerWidth methods in our application.Now we are migrating to ExtJS4. As per my Observation, these two methods are not there for panel.

Is there any thing replaces these two methods?

Upvotes: 1

Views: 1292

Answers (3)

hwang
hwang

Reputation: 46

if you need the body width/height(without header, dockeditems etc...)try this:

var height = Ext.getCmp('panelId').body.getHeight(true);

Upvotes: 1

user3070053
user3070053

Reputation: 51

Pass boolean true as parameter for the getHeight() function. So you get:

var height = Ext.getCmp('panelId').getEl().getHeight(true);

Upvotes: 0

JamesHalsall
JamesHalsall

Reputation: 13475

Why are you using innerHeight and innerWidth? You can get the height/width of the element that the Ext.Panel is rendered to as follows...

var height = Ext.getCmp('panelId').getEl().getHeight();

This should suffice unless you've got massive amounts of padding on your panel.

Upvotes: 0

Related Questions