-
29 Nov 2012 11:03 PM #1
Unanswered: height and width in percentage
Unanswered: height and width in percentage
how to give the percentage width config for container and panels in ExtJS ??? sencha touch allows for the same whereas i am not able to give the height/width in percentage with respect to parent contaiener inn ExtJS.
any idea would be helpfull.
-
30 Nov 2012 1:32 AM #2Sencha - Community Support Team
- Join Date
- May 2012
- Location
- Istanbul
- Posts
- 1,331
- Vote Rating
- 77
- Answers
- 124
Hi Deepak,
If you want to give height and width in %, use anchor layout like-
Code:Ext.create('Ext.Panel', { width: 500, height: 400, title: "AnchorLayout Panel", layout: 'anchor', renderTo: Ext.getBody(), items: [ { xtype: 'panel', title: '75% Width and 20% Height', anchor: '75% 20%' }, { xtype: 'panel', title: '100% Width and 50% Height', anchor: '100% 50%' }, { xtype: 'panel', title: '100% Width and 30% Height', anchor: '100%0 30%' } ] });sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.


Reply With Quote