[英]ExtJS 4 checkbox
我在字段集定义中找不到运行时中打开/关闭复选框的方法:
{
xtype: 'fieldset',
title: 'Do you want to add text file?',
itemId: 'chorFileCheck',
checkboxToggle: true,
items: [
{
xtype: 'filefield',
name: 'document',
fieldLabel: 'File',
labelWidth: 50,
allowBlank: false,
anchor: '100%',
regex: Portal.Const.DOC_ACCEPTED,
buttonText: 'Choose ...'
}
],
listeners: {
我可以手动处理此复选框,但找不到在我的代码中执行此操作的方法(在运行时创建)。 请提示我该怎么做。
您需要使用fieldset的collapse()
和expand()
方法分别取消选中和选中复选框。
对于取消选中复选框:
Ext.ComponentQuery.query("#chorFileCheck")[0].collapse();
对于复选框的选择:
Ext.ComponentQuery.query("#chorFileCheck")[0].expand();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.