1. #1
    Ext User
    Join Date
    Sep 2009
    Posts
    74
    Vote Rating
    0
    adibhagra is on a distinguished road

      0  

    Default Rendering a form within a viewport region

    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
    91
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      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,503
    Vote Rating
    52
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      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
    adibhagra is on a distinguished road

      0  

    Default


    thanks guys..

Thread Participants: 2