Extjs2.0常用备忘

继承关系:Component--->BoxComponent---->Container----->Panel---各种具体Panel

1.MessageBox

Ext.MessageBox.alert("ok");


Ext.Msg.show({
title:'Save Changes?',
msg: 'You are closing a tab that has unsaved changes. Would you like to save your changes?',
//值只能为MessageBox里Public Properties中的Button config
buttons: Ext.Msg.YESNOCANCEL,
//fn为回调
// fn: processResult,
animEl: 'elId',
//值只能为:值只能为MessageBox里Public Properties中的The CSS class
icon: Ext.MessageBox.WARNING
});


2.布局处理Viewport

var viewport = new Ext.Viewport({
id:'desk',
layout:'border',
items:[{region:'north',height:50},{region:'west',width:200},{region:'center'}]
}

);


3.Panel

var panel = new Ext.Panel({
// renderTo:'hello'可以替换掉panel.render("hello");
id:'hello',
title:'panlehell',
width:200,
height:200

});
panel.render("hello");



4.TabPanel

var tabPanel = new Ext.TabPanel({
renderTo:'hello',
activeTab: 0,
width:200,
height:200,
items:[
{title:'hello1',html:'hello1 content!'},//默认是Panel
new Ext.Panel({title:'hello2',html:'hello2 content'}),
new Ext.tree.TreePanel( {title:'树面板',loader:new Ext.tree.TreeLoader(),root:new Ext.tree.AsyncTreeNode( {text:'根节点',children:[ { leaf:true,text:'叶子1' }, { leaf:true,text:'叶子2' } ] } ) } ),
{xtype:'treepanel',title:'树面板',loader:new Ext.tree.TreeLoader(),root:new Ext.tree.AsyncTreeNode( {text:'根节点',children:[ { leaf:true,text:'叶子1' }, { leaf:true,text:'叶子2' } ] } ) }
]
}
);
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值