1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    7
    Vote Rating
    0
    zoluro is on a distinguished road

      0  

    Exclamation Unanswered: I want to render 'viewport' to an element on my page,how can do it?

    Unanswered: I want to render 'viewport' to an element on my page,how can do it?


    I want to render 'viewport' to an element on my page,how can do it?
    In fact, i found that the config(renderTo:'div1') do not work.It always render to body,why?
    Thanks

  2. #2
    Sencha User
    Join Date
    Aug 2011
    Posts
    53
    Vote Rating
    1
    Answers
    2
    Erikvip is on a distinguished road

      0  

    Default


    You can't, a Viewport represents the entire visible area in the browser, and it always attaches itself to document.body.

    See the docs on the viewport renderTo config:
    http://docs.sencha.com/ext-js/4-0/#!/api/Ext.container.Viewport-cfg-renderTo

    Code:
    renderTo : String/HTMLElement/Ext.Element
    Not applicable. Always renders to document body.
    It sounds like what you're after is the layout option, or a different layout manager. Take a look at the layouts example:

    http://dev.sencha.com/deploy/ext-4.0...t-browser.html

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    7
    Vote Rating
    0
    zoluro is on a distinguished road

      0  

    Default


    All right ,Thanks!

Thread Participants: 1

Tags for this Thread