View Full Version : How can i place a Border layout inside a div

6 Apr 2010, 1:52 PM

I have a special requirement where i need to place the whole border layout inside a div which will have specified width of 100% and height 80%. as they want to use the remaining 20% of the area for something else.. please help...

Thanks in Advance

6 Apr 2010, 9:45 PM
1. give your DIV an ID
2. specify the DIV's ID to 'renderTo' properties

Pls have a look at the Extjs examples, they should be useful enough to help you out...

6 Apr 2010, 11:25 PM
IMNSHO, Viewport should be able to be passed an el config, and not always use the document body!

Ext.override(Ext.Viewport, {
initComponent : function() {
this.el = Ext.get(this.el) || Ext.getBody();
this.el.dom.parentNode.className += ' x-viewport';
this.el.setHeight = Ext.emptyFn;
this.el.setWidth = Ext.emptyFn;
this.el.setSize = Ext.emptyFn;
this.el.dom.scroll = 'no';
this.allowDomMove = false;
this.autoWidth = true;
this.autoHeight = true;
Ext.EventManager.onWindowResize(this.fireResize, this);
this.renderTo = this.el;

7 Apr 2010, 7:32 AM
Thanks for the response but..i did not understand this one, i tried to look into some examples but dint not find a proper answer...Please be more specific, I am very new here, i really appreciate your help... all i want to do is to make the border layout fit inside a div which has 100% width and 80% height..the other 20% will be used for header and footer...