Home | Mail | Syndicate

welcome to my space

16 March, 2010 |

tabpanel in form in window height problem

  • Hi, Im trying to place a tabpanel in a formpanel in a window. But height in height is not adjusted to availible height. see screenshot.

    strange thing is, when I skip the formpanel and add TabPanel directly it works fine, so the problem is formpanel related...

    What am I missing ?


    /**
    * @author jeroen
    */
    PositionOpeningWindow = function (config)
    {
    Ext.apply(this, config);
    var TabProfile = new Ext.Panel({
    labelAlign: 'top',
    title: 'Profiel',
    bodyStyle:'padding:5px 5px 0',
    autoWidth:true,
    border:false,
    items: [{
    layout:'column',
    border:false,
    items:[{
    columnWidth:'.5',
    layout: 'form',
    reader: new Ext.data.JsonReader({
    root: 'PositionOpening',
    totalProperty: 'Result',
    id: 'Id'
    }, [
    {name: 'ProfileName', mapping: 'ProfileName'},
    {name: 'PositionTitle', mapping: 'PositionTitle'},
    {name: 'PhysicalLocation', mapping: 'PhysicalLocation'},
    {name: 'CompanyName', mapping: 'Company/CompanyName'},
    {name: 'PhysicalLocation', mapping: 'PhysicalLocation'}
    ]),
    border:false,
    defaultType: 'textfield',
    items: [{
    fieldLabel: 'Functietitel',
    name: 'PositionTitle',
    anchor:'95%'
    }, {
    fieldLabel: 'Bedrijfsnaam',
    name: 'CompanyName',
    anchor:'95%'
    }, {
    fieldLabel: 'Standplaats',
    name: 'PhysicalLocation',
    anchor:'95%'
    }, {
    fieldLabel: 'Profielnaam',
    name: 'ProfileName',
    anchor:'95%'
    }, {
    fieldLabel: 'Company',
    name: 'company',
    anchor:'95%'
    }]
    },{
    columnWidth:'.5',
    layout: 'form',
    border:false,
    defaultType: 'textfield',
    items: [{
    xtype:'textfield',
    fieldLabel: 'Last Name',
    name: 'last',
    anchor:'95%'
    },{
    xtype:'textfield',
    fieldLabel: 'Email',
    name: 'email',
    vtype:'email',
    anchor:'95%'
    },{
    xtype:'textfield',
    fieldLabel: 'Email',
    name: 'email2',
    vtype:'email',
    anchor:'95%'
    },{
    xtype:'textfield',
    fieldLabel: 'Email',
    name: 'email3',
    vtype:'email',
    anchor:'95%'
    },{
    xtype:'textfield',
    fieldLabel: 'Email',
    name: 'email4',
    vtype:'email',
    anchor:'95%'
    }]
    }]
    }]
    });

    var tab2 = new Ext.Panel({
    title:"Tab 2",
    height:200
    });
    var tab3 = new Ext.Panel({
    title:"Tab 3"
    });

    var TabPanel = new Ext.TabPanel({
    border:false,
    activeTab: 0,
    frame:true,
    plain:true,
    tabPosition:"bottom",
    defaults:{autoScroll: true},
    items:[TabProfile,tab2,tab3]
    });

    var Form = new Ext.FormPanel({
    defaults:{bodyStyle:'padding:5px'},
    action:'GET',
    items:[TabPanel],
    layout:'fit',
    reader: new Ext.data.JsonReader({
    root: 'PositionOpening',
    totalProperty: 'Result',
    id: 'Id'
    }, [
    {name: 'ProfileName', mapping: 'ProfileName'},
    {name: 'PositionTitle', mapping: 'PositionTitle'},
    {name: 'PhysicalLocation', mapping: 'PhysicalLocation'},
    {name: 'CompanyName', mapping: 'Company/CompanyName'},
    {name: 'PhysicalLocation', mapping: 'PhysicalLocation'}
    ]),
    buttons: [{
    text: 'Save',
    handler:onSaveClick
    },{
    text: 'Cancel'
    }]
    });

    Form.load({url:'../server/positionopening/get/id/11',waitMsg:'Laden...'});

    function onSaveClick()
    {
    var result = Form.form.submit({
    url:'../server/positionopening/set/id/11',
    waitMsg:'Bezig met opslaan van data...'
    });
    }

    DefaultWindow.superclass.constructor.call(this,
    {
    layout:'fit',
    items:[Form]
    });
    }

    Ext.extend(PositionOpeningWindow, DefaultWindow);


  • i couldn't run your code correctly!







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about tabpanel in form in window height problem , Please add it free.
    PNNL, SGI Think Big Danes Launch Europe's First 24-Hour Internet TV Station