表单"form","column"(以及混合布局)

常见的表单布局

            var pnForm = new Ext.form.FormPanel({
                title:'主体信息',                
                labelAlign: 'right',
                buttonAlign: 'center',
                labelWidth: 140,
                defaults: { autoWidth: true },
                padding: 20,
                frame: false,
                border: false,
                autoScroll: true,
                items: [
                 {
                     layout: 'column',
                     xtype: 'fieldset',
                     title: '项目信息',
                     items: [
                            {
                                columnWidth: 1, //列宽为50%
                                layout: 'column',
                                border: false,
                                style: 'margin-left: 0;', //边框间距
                                items: 
                    [
                                    {
                                        columnWidth: .5, //列宽为50%
                                        layout: 'form',
                                        border: false,
                                        style: 'margin-left: 0;', //边框间距
                                        items: [txtProjectName, txtApplyPeople]
                                    },
                                    {
                                        columnWidth: .5, //列宽为50%
                                        layout: 'form',
                                        border: false,
                                        style: 'margin-left: 0;', //边框间距
                                        items: [rdoBelongsTo, cmbCurrency]
                                    },
                                     {
                                         columnWidth: .7, //列宽为50%
                                         layout: 'form',
                                         border: false,
                                         style: 'margin-left: 0;', //边框间距
                                         items: 
[ { xtype:
'compositefield', fieldLabel:'项目地址', items:
[ txtProjectAddress, { xtype:
'displayfield', value: "*", style: "color:#FF0000;margin-top:5;font-size:14px;" }, btnSelect ] } ] } ] } ] } ], listeners: { 'render': function() { } } });
posted @ 2012-06-05 17:09  angus_csh  阅读(455)  评论(0编辑  收藏  举报