Results 1 to 4 of 4

Thread: Rendering a form within a viewport region

  1. #1
    Ext User
    Join Date
    Sep 2009
    Posts
    74
    Vote Rating
    0
      0  

    Default Rendering a form within a viewport region

    Hey all,

    I have a form that i would like to display within the west region of my viewport,

    however it does not allow me to specify my form within the items:[] object as var myForm = new Ext.FormPanel and if i use xtype:form and then create my form , i have problems later on accessing it .

    can someone please tell me how to put my form within my west region.

    my code is as follows:

    Ext.onReady(function(){

    var myForm = new Ext.FormPanel({
    .
    .
    });

    var viewport = new Ext.Viewport({

    layout:'border',
    items:[{
    region:'north'
    },
    {
    region:'west',
    items:[{
    // i want to display my form here
    }
    thanks and regards,

    ice

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    118
      0  

    Default

    You are looking for:
    Code:
    {
      region: 'west',
      layout: 'fit',
      items: [myForm]
    }
    but this would be overnested (uses an extra unneeded panel).

    It would be better to use:
    Code:
    var myForm = new Ext.FormPanel({
      region: 'west',
      ...
    });
    new Ext.Viewport({
      layout:'border',
      items:[{
        region:'north'
      }, myForm]
    });

  3. #3
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,607
    Vote Rating
    59
      0  

    Default

    You had the items config there already. Where was the blockage?

    http://www.extjs.com/deploy/ext-3.0....r&member=items

  4. #4
    Ext User
    Join Date
    Sep 2009
    Posts
    74
    Vote Rating
    0
      0  

    Default

    thanks guys..

Posting Permissions

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