Ext查询问题

Ext查询问题

问题描述:

1.写一个combox,不需要下拉效果,做一个查询,当点击按钮时获取输入的值
2.怎样改变combox按钮的显示图片

效果如:查看图片附件

了解一下Ext.form.TwinTriggerField组件,他有如下几个属性是用来配置旁边按钮的

trigger1Class : String

An additional CSS class used to style the trigger button. The trigger will always get the class 'x-form-trigger' by default and triggerClass will be appended if specified.

trigger2Class : String
An additional CSS class used to style the trigger button. The trigger will always get the class 'x-form-trigger' by default and triggerClass will be appended if specified.

TriggerClass : String

你可以到网上找找也可以下载到这样组件的扩展,在2.0的时候是扩展的.现在3.0直接有支持的了,就是Ext.form.TwinTriggerField类

你要的不是combo,而应该是类似它那样继承一个TriggerField.
如:
var t = new Ext.form.TriggerField({
fieldLabel:'test2',
triggerConfig:{tag: "img", src: "/images/xx.png", cls: "mybtn x-form-trigger "}
})