PDA

View Full Version : How to sum widths and paddings?



lucazav
19 Dec 2009, 9:11 AM
Hi all,

I'm new in ExtJS, but really excited to use this framework! =P~
Just an issue: I need to sum any widths and paddings, but it doesn't work. I use this code:

var widthTitle = oInfoTitle.getWidth();
var headerWidth = Ext.get("section-header").getWidth();
var paddingWidth = Ext.get("section-header").getPadding('l');
var paddingTitle = Ext.get("section-info-title").getPadding('r');

oDivInfoDoodle.setWidth(headerWidth
- paddingWidth
- paddingTitle
- widthTitle);

What's wrong?
Thank you!

Animal
20 Dec 2009, 1:03 AM
With 3.1, you would use



oInfoTitle.getViewSize().width;

lucazav
20 Dec 2009, 3:49 AM
Thank you very much, I solved my issue.
But I wasn't able to find the getViewSize function in the online documentation. Pehraps I'm missing something...

Animal
20 Dec 2009, 9:38 AM
Looks like Ext Core hasn't been upgraded to 3.1

http://www.extjs.com/deploy/dev/docs/?class=Ext.Element&member=getViewSize

lucazav
15 Jan 2010, 1:18 AM
I downloaded the Ext Core 3.1 library just now. It seems it doesn't contain the element method getSize()... I used it from the Ext All 3.1 library in order to get the size of a div element. Is there an equivalent of getSize() in the Ext Core lib??

Thank you very much.