-
22 Apr 2012 9:27 PM #1
top, left, bottom and right co-ordinates of a Panel
top, left, bottom and right co-ordinates of a Panel
How can I get top, left, bottom and right co-ordinates of a Panel using extjs4.0, given the id of my panel is "myPanel"?
I tried myPanel.frameSize.top, but it comes as zero. Looks like, I am hitting something wrong here.
Please advise.
Thanks!
-
25 Apr 2012 10:57 AM #2
Try this and have a look around

Regards,Code:Ext.create('Ext.panel.Panel', { id: 'mypanel', title: 'Hello', width: 200, height: 100, html: '<p>World!</p>', renderTo: Ext.getBody() }); var pnl = Ext.getCmp('mypanel'); console.log(pnl); console.log(pnl.getPosition()); console.log(pnl.componentLayout.info.bodyBox);
Scott.


Reply With Quote