Results 1 to 4 of 4

Thread: How can i place a Border layout inside a div

  1. #1
    Ext JS Premium Member
    Join Date
    Mar 2010
    Posts
    13

    Default How can i place a Border layout inside a div

    HI

    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
    Santosh

  2. #2

    Default

    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...

  3. #3
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    IMNSHO, Viewport should be able to be passed an el config, and not always use the document body!

    Code:
    Ext.override(Ext.Viewport, {
        initComponent : function() {
            Ext.Viewport.superclass.initComponent.call(this);
            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;
        }
    });

  4. #4
    Ext JS Premium Member
    Join Date
    Mar 2010
    Posts
    13

    Default

    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...

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •