EXT教程三:ExtPanel的使用.docx_第1页
EXT教程三:ExtPanel的使用.docx_第2页
EXT教程三:ExtPanel的使用.docx_第3页
EXT教程三:ExtPanel的使用.docx_第4页
EXT教程三:ExtPanel的使用.docx_第5页
已阅读5页,还剩2页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

本帖最后由 Jethro 于 2011-6-4 15:47 编辑ExtJS4学习笔记(二)-HBox的使用要使用HBox布局方式,首先的熟悉下一下几个主要属性:一、align:字符类型,指示组件在容器内的对齐方式。有如下几种属性。 1、top(默认):排列于容器顶端。 2、middle:垂直居中排列于容器中。 3、stretch:垂直排列且拉伸义填补容器高度 4、stretchmax:垂直拉伸,并且组件以最高高度的组件为准。二、flex:数字类型,指示组件在容器中水平呈现方式,通俗的讲,就是指示组件在容器中的相对宽度。三、pack : 字符类型,指示组件在容器的位置,有如下几种属性。 1、start(默认):组件在容器左边 2、center:组件在容器中间 3、end:组件在容器的右边实例代码:一、HTML代码: HBox实例- Ext.onReady(function() var d1 = Ext.create(Ext.Panel, title:HBox 顶对齐,且组件在容器的左边, frame:true, width:600, height:100, items: anchor:100%, layout: type:hbox, padding:10, pack:start, align:top , defaults:margins:0 5 0 0, items: xtype:button, text: Button 1 , xtype:button, text: Button 2 , xtype:button, text: Button 3 , xtype:button, text: Button 4 ) d1.render(d1); var d2 = Ext.create(Ext.Panel, title:HBox 垂直对齐,且组件在容器的右边, frame:true, width:600, height:100, items: anchor:100%, layout: type:hbox, padding:10, align:middle, pack:end , defaults:margins:0 5 0 0, items: xtype:button, text: Button 1 , xtype:button, text: Button 2 , xtype:button, text: Button 3 , xtype:button, text: Button 4 ) d2.render(d2); var d3 = Ext.create(Ext.Panel, title:HBox 垂直水平居中,并且所有控件高度为最高控件的高度, frame:true, width:600, height:100, items: anchor:100%, layout: type: hbox, padding:5, align:stretchmax, pack:center , defaults:margins:0 5 0 0, items: xtype:button, text: Small Size , xtype:button, scale: medium, text: Medium Size , xtype:button, scale: large, text: Large Size ) d3.render(d3); ) Ext.onReady(function() var d1 = Ext.create(Ext.Panel, title:HBox 顶对齐,且组件在容器的左边, frame:true, width:600, height:100, items: anchor:100%, layout: type:hbox, padding:10, pack:start, align:top , defaults:margins:0 5 0 0, items: xtype:button, text: Button 1 , xtype:button, text: Button 2 , xtype:button, text: Button 3 , xtype:button, text: Button 4 ) d1.render(d1); var d2 = Ext.create(Ext.Panel, title:HBox 垂直对齐,且组件在容器的右边, frame:true, width:600, height:100, items: anchor:100%, layout: type:hbox, padding:10, align:middle, pack:end , defaults:margins:0 5 0 0, items: xtype:button, text: Button 1 , xtype:button, text: Button 2 , xtype:button, text: Button 3 , xtype:button, text: Button 4 ) d2.render(d2); var d3 = Ext.create(Ext.Panel, title:HBox 垂直水平居中,并且所有控件高度为最高控件的高度, frame:true, width:600, height:100, items: anchor:100%, layout: type: hbox, padding:5, align:stretchmax, pack:center , defaults:margins:0 5 0 0, items: xtype:button, text:

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论