示例一:
Ext.onReady(
function() {
new Ext.Panel(
{
renderTo:hello,
width:400,
height:300,
title:"我是Panel",
html:"主体内容"
}
);
}
);
1.autoLoad:有效的 url 字符串,把那个 url 中的 body 中的数据加载显示,但是可能没有
样式和 js 控制,只是 html 数据
2.autoScroll:设为 true 则内容溢出的时候产生滚动条,默认为 false
3.autoShow:设为 true 显示设为"x-hidden"的元素,很有必要,默认为 false
4.bbar:底部条,显示在主体内
5.tbar:顶部条,显示在主体内
6.buttons:按钮集合,自动添加到 footer 中(footer 参数,显示在主体外)
7.buttonAlign:footer 中按钮的位置,枚举值为:"left","right","center",默认
为 right
8.collapsible:设为 true,显示右上角的收缩按钮,默认为 false
9.draggable:true 则可拖动,但需要你提供操作过程,默认为 false
10.html:主体的内容
11.id:id 值,通过 id 可以找到这个组件,建议一般加上这个 id 值
12.width:宽度
13.height:高度
13.title:标题
14.titleCollapse:设为 true,则点击标题栏的任何地方都能收缩,默认为 false.
15.applyTo:(id)呈现在哪个 html 元素里面
16.contentEl:(id)呈现哪个 html 元素里面,把 el 内的内容呈现
17.renderTo:(id)呈现在哪个 html 元素里面
示例二:显示滚动条
Ext.onReady(
function() {
new Ext.Panel(
{
renderTo:hello,
width:400,