var formUpload = new Ext.form.FormPanel({
labelWidth: 4,
fileUpload:true,
defaultType: 'textfield',
items: [{
xtype: 'textfield',
fieldLabel: '文 件',
name: 'upload',
inputType: 'file',
allowBlank: false,
blankText: '上传文件,
anchor: '80%' // anchor width by percentage
}]
});
我用from自带的文件上传功能,可是效果出来“浏览”按钮特别小,文件框也变窄了,不知道怎么能够调成正常大小,“浏览”按钮也变为extjs一般button的大小?
谢谢
[b]问题补充:[/b]
这是别人的图 不过我的和这个一样大 对比下面的确定窄了不少
[img]/upload/attachment/140374/6408604e-9a81-3273-9d13-d29aff425f03.jpg[/img]
中文也这么小?
试下:
[code="java"]
.fileInput{
font-size:20px;
}
items: [{
xtype: 'textfield',
[b]cls:'fileInput',[/b]
fieldLabel: '文 件',
name: 'upload',
inputType: 'file',
allowBlank: false,
blankText: '上传文件',
anchor: '80%'
}]
[/code]
怎么个小法?给个图咯.
我这边似乎正常.
另外,对这个按钮设置样式的方式看:[url]http://www.quirksmode.org/dom/inputfile.html[/url]
你完全可以用 fileuploadField组件阿,这个是扩展的,样子漂亮多了.样式也是与css一样的.
[url]http://extjs.com/deploy/dev/examples/form/file-upload.html[/url]