Menu

several form fields onto the same row

2011-05-28
2013-05-28
  • Giuseppe Bozzo

    Giuseppe Bozzo - 2011-05-28

    I try an example with several form fields onto the same row.
    Possibly be able to fix the screen position.
    Sorry, but I am beginning

     
  • Aaron Bartell

    Aaron Bartell - 2011-05-28

    Are you wondering about how to position multiple fields on the same line?  I am not following what you are asking.  Could you post some code or a screenshot?

    AaronBartell.com

     
  • Giuseppe Bozzo

    Giuseppe Bozzo - 2011-06-03

    I'm sorry for my bad English.
    This is my problem:

    var fp1 = new Ext.FormPanel({
            frame: true,
            title:'SITUAZIONE FINANZIARIA CLIENTE',
            labelAlign: 'right',
    layout: 'Form',
            width:1650,
            waitMsgTarget: true,
            defaultType: 'textfield',
            items: [                                
        {xtype: 'textfield', fieldLabel: 'Codice cliente', id: 'Icli'},
                {fieldLabel: 'Rag.', id: 'Orag', width: '300' },
        {fieldLabel: 'Pagamento', id: 'Opag' },
                {fieldLabel: 'Desc', id: 'Odepag'},
                {id: 'action', hidden:true}
                ],

            buttons: [
              {text: 'Load',id: 'btnLoad',handler: loadHnd},
              {text: 'Submit',id: 'btnSubmit',handler: submitHnd}
            ]

        });

    I want the third and fourth field to be on the same line, but they appear close without description.

    ar fp1 = new Ext.FormPanel({
            frame: true,
            title:'SITUAZIONE FINANZIARIA CLIENTE',
            labelAlign: 'right',
    width:1650,
            waitMsgTarget: true,
          

            items: [ 

        {xtype: 'textfield', fieldLabel: 'Codice cliente', id: 'Icli'},
                {xtype: 'textfield', fieldLabel: 'Rag.', id: 'Orag', width: '300' },
    {

    layout: 'column',

    items: [{
        layout:'form',
    items: [{

    items:[{

        xtype: 'textfield', fieldLabel: 'Pagamento', id: 'Opag'},

                {xtype: 'textfield', fieldLabel: 'Desc', id: 'Odepag'}

    ]
    }]
    }]
    },

                {id: 'action', hidden:true}
                ],

            buttons: [
              {text: 'Load',id: 'btnLoad',handler: loadHnd},
              {text: 'Submit',id: 'btnSubmit',handler: submitHnd}
            ]

        });

    I try  to attach a link

    Thanks

     
  • Aaron Bartell

    Aaron Bartell - 2011-07-04

    One approach I have used it to go the route of a table layout.  Here's a sample:

    new Ext.Panel({ 
                    id: 'tape_Win5a',
                    layout: 'table',
                    layoutConfig: {
                        columns: 2
                    },
                    padding: '5px',
                    items: [{
                        id: 'fld_Win5aFld1',
                        xtype: 'numberfield',
                        width: 100,
                        maxValue: 999999999,
                        disabled: 'true'
                    }, new Ext.Button({
                        id: 'btn_Win5a',
                        text: 'Submit',
                    })
    

    Note I used Ext.Panel instead of Ext.FormPanel.  FormPanel gives you formatting out of the box (i.e. two columns) but we want to move away from that so we use a Ext.Panel instead and give it a layout of 'table' and then specify how many columns we want.

    AaronBartell.com

     

Log in to post a comment.