javascript代码实例教程-ext学习_layout布局

发布时间:2019-02-25 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了javascript代码实例教程-ext学习_layout布局脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
小宝典致力于为广大程序猿(媛)提供高品质的代码服务,请大家多多光顾小站,小宝典在此谢过。 1.ExtJS一共包含十种布局,常用的布局有border、column、fIT、form、card、tabel等布局

column布局:

[htML]  

Ext.onReady(function(){  

    new Ext.Panel({  

        renderTo:"hello",  

        width:400,  

        height:200,  

        layout:"column",  

        items:[{columnWidth:.5,  

        title:"面板1"},  

        {columnWidth:.5,  

        title:"面板2"}]  

    });  

});  

[html]  

Ext.onReady(function(){  

    new Ext.Panel({  

        renderTo:"hello",  

        title:"容器组件",  

        layout:"column",  

        width:500,  

        height:100,  

        items:[  

            {title:"列1",width:100},  

            {title:"列2",width:200},  

            {title:"列3",width:100},  

            {title:"列4"}  

           ]  

        }  

    );  

});  

[html]  

Ext.onReady(function(){  

    new Ext.Panel({  

        renderTo:"hello",  

        title:"容器组件",  

        layout:"column",  

        width:500,  

        height:100,  

        items:[  

            {title:"列1",columnWidth:.2},  

            {title:"列2",columnWidth:.3},  

            {title:"列3",columnWidth:.3},  

            {title:"列4",columnWidth:.2}  

          ]  

        });  

});  

 

[html]  

Ext.onReady(function(){  

    new Ext.Panel({  

        renderTo:"hello",  

        title:"容器组件",  

        layout:"column",  

        width:500,  

        height:100,  

        items:[{title:"列1",width:200},  

        {title:"列2",columnWidth:.3},  

        {title:"列3",columnWidth:.3},  

        {title:"列4",columnWidth:.4}  

        ]   

    });  

});  

 

 

border布局:

[html]  

Ext.onReady(function(){  

    new Ext.Viewport({  

        layout:"border",  

        items:[  

            {region:"north",height:50,title:"顶部面板"},  

            {region:"south",height:50,title:"底部面板"},  

            {region:"center",title:"中央面板"},  

            {region:"west",width:100,title:"左边面板"},  

            {region:"east",width:100,title:"右边面板"}  

        ]  

    });  

});  

 

觉得可用,就经常来吧! 脚本宝典 欢迎评论哦! js脚本,巧夺天工,精雕玉琢。小宝典献丑了!

脚本宝典总结

以上是脚本宝典为你收集整理的javascript代码实例教程-ext学习_layout布局全部内容,希望文章能够帮你解决javascript代码实例教程-ext学习_layout布局所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。