combox属性配置

上传人:汽*** 文档编号:550324049 上传时间:2023-01-14 格式:DOC 页数:10 大小:69.50KB
返回 下载 相关 举报
combox属性配置_第1页
第1页 / 共10页
combox属性配置_第2页
第2页 / 共10页
combox属性配置_第3页
第3页 / 共10页
combox属性配置_第4页
第4页 / 共10页
combox属性配置_第5页
第5页 / 共10页
点击查看更多>>
资源描述

《combox属性配置》由会员分享,可在线阅读,更多相关《combox属性配置(10页珍藏版)》请在金锄头文库上搜索。

1、配置项1、transform : Mixed 要转换为组合框的id,DOM节点或者已有的select元素。 2、lazyRender : Boolean 值为true时阻止ComboBox渲染直到该对象被请求(被渲染到Ext.Editor 组件的时候应该使用这个参数,默认为 false)。 3、autoCreate : String/Object 一个指定的DomHelper配置对象,如果为真则为一个默认对象(tag: input, type: text, size: 20, autocomplete: off)。 4、store : Ext.data.Store/Array 该组合框绑定的数

2、据仓库(默认为 undefined)。如是的string值,不要用引起来,否则就不是object数据,而是字符串,这是一个很巧妙的关键点:把服务器的字符串转化为js的object数据,是不是超级方便/下面就几种数据以代码举例说明1.一维数组:江西,湖北,值同时赋给ComboBox的value和text2.二维和多维数组:one,bbar,111,two,tbar,222,第一维和第二维分别赋值给value和text,其他维忽略3.store类型:包括GroupingStore, JsonStore, SimpleStore. /我们分三步走: /第一步:提供数据: var data=湖北,hu

3、bei,江西,jiangxi,安徽,anhui; /第二步:导入到store中: var store = new Ext.data.SimpleStore( fields: chinese, english, data : data ); /第三步 :把store托付给comboBox的store var combo = new Ext.form.ComboBox( store: store, displayField:english,/store字段中你要显示的字段,多字段必选参数,默认当mode为remote时displayField为undefine,当select列表时displayF

4、ield为text mode: local,/因为data已经取数据到本地了,所以local,默认为remote,枚举完 emptyText:请选择一个省份., applyTo: combo );5、title : String 如果提供了,则会创建一个包含此文本的元素并被添加到下拉列表的顶部(默认为 undefined,表示没有头部元素)。 6、listWidth : Number 以象素表示的下拉列表的宽度(默认的宽度与ComboBox的width属性一致)。 7、displayField : String 组合框用以展示的数据的字段名(如果mode=remote则默认为 undefine

5、d,如果mode = local 则默认为 text)。 T 8、valueField : String 组合框用以取值的数据的字段名(如果mode=remote则默认为 undefined,如果mode = local 则默认为 value)。 9、hiddenName : String 如果指定了, 则会动态生成一个以指定名称命名的隐藏域用来存放值数据(默认为)。/真正提交时此combo的name,请一定要注意 10、hiddenId : String If #hiddenName is specified, hiddenId can also be provided to give th

6、e hidden field a unique id (defaults to the hiddenName). The hiddenId and combo #id should be different, since no two DOM nodes should share the same id. 11、hiddenValue : String Sets the initial value of the hidden field if #hiddenName is specified to contain the selected #valueField, from the Store

7、. Defaults to the configured #value. 12、listClass : String 13、selectedClass : String 下拉列表中选中项应用的CSS类(默认为 x-combo-selected)。 14、triggerClass : String 应用到触发器身上的CSS样式类。 15、shadow : Boolean/String 值为true或者sides为默认效果,frame为四方向阴影,drop 为右下角方向阴影。 16、listAlign : String 一个有效的方位锚点值。点击Ext.Element#alignTo查看支持的方向

8、锚点(默认为 tl-bl)。 17、maxHeight : Number 以象素表示的下拉列表最大高度(默认为 300) 18、minHeight : Number 以象素表示的下拉列表最小高度(默认为 90) 19、triggerAction : String 请设置为all,否则默认为query的情况下,你选择某个值后,再此下拉时,只出现匹配选项,如果设为all的话,每次下拉均显示全部选项 20、minChars : Number 在autocomplete和typeahead 被激活之前用户必须输入的字符数(默认为4,如果editable = false则此属性无效)。 21、typeA

9、head : Boolean 值为true时在经过指定延迟(typeAheadDelay)后弹出并自动选择输入的文本,如果该文本与已知的值相匹配(默认为false)。 22、queryDelay : Number 以毫秒表示的从开始输入到发出查询语句过滤下拉列表的时长(如果mode=remote则默认为500,如果mode = local 则默认为10)。 23、pageSize : Number 如果值大于0,则在下拉列表的底部显示一个分页工具条,并且在执行过滤查询时将传递起始页和限制参数。 只在 mode = remote时生效(默认为 0)。 24、selectOnFocus : Boo

10、lean 值为 ture 时表示字段获取焦点时自动选择字段既有文本(默认为 false)。 25、queryParam : String 供querystring查询时传递的名字(默认为 query)。 26、loadingText : String 当读取数据时在下拉列表显示的文本。仅当mode = remote时可用(默认为 Loading.)。 27、resizable : Boolean 值为true时则在下拉列表的底部添加缩放柄(默认为false)。 28、handleHeight : Number 以像素表示的下拉列表的缩放柄的高度,仅当resizable = true 时可用(默

11、认为 8)。 29、editable : Boolean 值为false时防止用户直接在输入框内输入文本,就像传统的选择框一样(默认为 true)。 30、allQuery : String 发送到服务器用以返回不经过滤的所有记录的文本(默认为 )。 31、mode : String 如果ComboBox读取本地数据则将值设为local(默认为 remote 表示从服务器读取数据)。 32、minListWidth : Number 以像素表示的下拉列表的最小宽度(默认为70, 如果listWidth的指定值更高则自动忽略该参数)。 33、forceSelection : Boolean 值为

12、true时将限定选中的值为列表中的值,值为false则允许用户将任意文本设置到字段(默认为 false)。 34、typeAheadDelay : Number 以毫秒表示的 typeahead 文本延迟显示量,仅当 typeAhead = true 时生效(默认为 250)。 35、valueNotFoundText : String 当使用 name/value 组合框时,如果调用setValue方法时传递的值没有在仓库中找到,且定义了valueNotFoundText则在字段中显示该值(默认为 undefined)。 36、lazyInit : Boolean True to not i

13、nitialize the list for this combo until the field is focused (defaults to true) 37、ext:qtipattribute which might display other fields from the Store. The dropdown list is displayed in a DataView. See Ext.DataView for details. 38、itemSelector : String This setting is required if a custom XTemplate ha

14、s been specified in #tpl which assigns a class other than x-combo-list-item to dropdown list items. A simple CSS selector (e.g. div.some-class or span:first-child) that will be used to determine what nodes the DataView which handles the dropdown display will be working with. 39、hideTrigger : Boolean 为true时隐藏

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 建筑/环境 > 施工组织

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号