hkmjia 2013-07-17 01:23 采纳率: 0%
浏览 4018

EXTjs自适应窗口大小问题 求大神指点

代码如下:
Ext.define('MyApp.view.MyPanel', {
extend: 'Ext.panel.Panel',

autoRender: false,
id: 'panel',
layout: {
    type: 'fit'
},
overlapHeader: true,
title: '分支机构目录',
titleAlign: 'left',
titleCollapse: false,

initComponent: function() {
    var me = this;

    Ext.applyIf(me, {
        items: [
            {
                xtype: 'treepanel',
                autoRender: false,
                id: 'treepanel',
                itemId: 'panel',
                constrain: true,
                autoScroll: true,
                defaultAlign: '[100%,100%]',
                header: false,
                title: 'My Tree Panel'
            }
        ],
        dockedItems: [
            {
                xtype: 'container',
                dock: 'bottom',
                id: 'container',
                layout: {
                    type: 'hbox'
                },
                items: [
                    {
                        xtype: 'button',
                        margins: '7 5 0 0 ',
                        margin: '0 5 0 0',
                        width: 80,
                        allowDepress: false,
                        iconAlign: 'top',
                        iconCls: '',
                        menuAlign: 'tl----bl?',
                        text: '新增分类'
                    },
                    {
                        xtype: 'button',
                        margins: '7 5 0 0 ',
                        margin: '0 5 0 0 ',
                        width: 80,
                        text: '修改分类'
                    },
                    {
                        xtype: 'button',
                        margins: '7 5 0 0 ',
                        margin: '0 5 0 0 ',
                        width: 80,
                        text: '删除分类'
                    },
                    {
                        xtype: 'button',
                        margins: '7 5 0 0 ',
                        margin: '0 5 0 0 0 ',
                        width: 100,
                        text: '新增分支机构'
                    },
                    {
                        xtype: 'button',
                        margins: '7 5 0 0 ',
                        margin: '0 5 0 0 0',
                        width: 100,
                        text: '修改分支机构'
                    },
                    {
                        xtype: 'button',
                        margins: '7 5 0 0 ',
                        margin: '0 5 0 0',
                        width: 100,
                        text: '删除分支机构'
                    },
                    {
                        xtype: 'button',
                        margins: '7 5 0 0 ',
                        margin: '0 5 0 0 ',
                        width: 100,
                        text: '停用分支机构'
                    },
                    {
                        xtype: 'button',
                        margins: '7 5 0 0 ',
                        margin: '0 5 0 0',
                        width: 60,
                        text: '移动'
                    },
                    {
                        xtype: 'container',
                        flex: 1,
                        layout: {
                            align: 'middle',
                            pack: 'end',
                            type: 'hbox'
                        },
                        items: [
                            {
                                xtype: 'button',
                                margins: '5 5 0 0 ',
                                autoRender: false,
                                margin: '0 5 0 0 ',
                                width: 60,
                                iconAlign: 'right',
                                text: '退出'
                            },
                            {
                                xtype: 'button',
                                margins: '5 5 0 0 ',
                                margin: '0 5 0 0',
                                width: 60,
                                text: '刷新'
                            }
                        ]
                    }
                ]
            }
        ]
    });

    me.callParent(arguments);
}

});

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
    • ¥15 lammps拉伸应力应变曲线分析
    • ¥15 C++ 头文件/宏冲突问题解决
    • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
    • ¥50 安卓adb backup备份子用户应用数据失败
    • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
    • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
    • ¥30 python代码,帮调试,帮帮忙吧
    • ¥15 #MATLAB仿真#车辆换道路径规划
    • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建