Results 1 to 3 of 3

Thread: two var as item in viewport

  1. #1
    Sencha User
    Join Date
    Apr 2011
    Location
    Netherlands
    Posts
    51
    Vote Rating
    0
      0  

    Question two var as item in viewport

    Hey,

    i have two vars (settings and grid) the one is a formpanel the other a grid. I want to add them to my viewport like this:

    var pnl = new Ext.Viewport( {
    renderTo: Ext.getBody(),
    id:'MyViewport',
    frame:false,
    layout:'fit',
    items: [settings, grid]
    });

    but it will only show settings. If i put grid at the beginning it will only show grid. What am i doing wrong?

  2. #2
    Sencha User
    Join Date
    Apr 2010
    Posts
    78
    Vote Rating
    1
      0  

    Default

    Toby,
    The 'fit' layout is for a single item that will fill the container, hence it'll only show the first item in your list. You have to decide how you want the two panels laid out in your viewport and set 'layout' accordingly.

    See the many, many examples on layouts.

    Rich.
    ExtJS Developer, amongst other things.

  3. #3
    Sencha User
    Join Date
    Apr 2011
    Location
    Netherlands
    Posts
    51
    Vote Rating
    0
      0  

    Default

    Cool i removed the layout and it works. 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
  •