zoukankan      html  css  js  c++  java
  • ExtJs布局中,控件如何水平居中?

    如此即可,有图有代码有j8:

    这里写图片描述

    var formGridHead = Ext.create('Ext.form.Panel', {
            id: 'MyGridHead',
            region: 'north',
            bodyPadding: 10,
            bodyStyle: 'background:#fff',
            split: false,
            header: false,
            collapsible: true,
            items: [
                    { xtype: 'panel'
                    , border: false
                    , layout: {
                        type: 'vbox',
                        align: 'center'
                    },  '100%', items: [
                    {
                        xtype: 'fieldcontainer'
                        , layout: 'column'
                        , items: [
    {
        xtype: 'button',
        text: '<span class="hydg_btn">标准查询</span>',
        scale: 'medium',
        id: 'btnSearchOption',
        listeners: {
            click: {
        }
    }
    }, { html: '', border: false,  30 }
    , {
        xtype: 'button',
        text: '<span class="hydg_btn">高级查询</span>',
        scale: 'medium',
        id: 'btnSearchOptionPower',
        listeners: {
            click: {
        }
    }
    }, { html: '', border: false,  30 }
                            , {
                                xtype: 'button',
                                text: '<span class="hydg_btn">浏览统计图</span>',
                                scale: 'medium',
                                id: 'btnViewTongji',
                                listeners: {
                                    click: {
                                }
                            }
                        }
                            ]
                    }
                        ]
                    }
                ]
        });

    其中重点在于:

    , layout: {
                        type: 'vbox',
                        align: 'center'
                    },  '100%',

    版权声明:本文为博主原屙文章,喜欢你就担走。

  • 相关阅读:
    DockerFile构建步骤及命令
    linux安装nginx及常用命令
    docker常用命令
    Docker安装
    获取TrustedInstaller权限
    获取本机公网ip的url地址
    centOS7配置ip
    VS Code配置c语言环境
    Linux l 2.4.20-8 # 溢出
    VMware Destination Host Unreachable
  • 原文地址:https://www.cnblogs.com/leftfist/p/4764230.html
Copyright © 2011-2022 走看看