将 style 属性与 ext.forms.combobox 一起使用
正在开发一个应用程序,其界面主要是用 EXT.JS 编写的 我在 ext.form.combo-box 方面遇到了麻烦...我正在尝试调整组合框的样式,但不确定样式属性是否有效并且我可以使用它,我尝试过但它不起作用对我来说,这是我的代码:
this.m_arriveByForm = new Ext.form.ComboBox({
id: 'trip-arrive-form',
name: 'arriveBy',
hiddenName: 'arriveBy',
style: {position:'relative', left:'12px'}, // style attribute i added
fieldLabel: this.locale.tripPlanner.labels.when,
store: this.m_arriveByStore,
value: this.m_arriveByStore.getAt(0).get('opt'),
displayField: 'text',
valueField: 'opt',
anchor: this.FIELD_ANCHOR,
mode: 'local',
triggerAction: 'all',
editable: false,
allowBlank: false,
lazyRender: false,
typeAhead: true,
forceSelection: true,
selectOnFocus: true,
});
当我仅添加一种样式规则时它会起作用,但如果我添加了不止一种样式规则,它就会停止工作,感觉就像 ayntax 错误,但你能帮助我吗?
am developing an application which its interface is mostly written in EXT.JS
am having a trouble with ext.form.combo-box...am trying to adjust the style of the combo-box,but am not sure if the style attribute is valid and i can use it, i tried it but its not working for me,here is my code:
this.m_arriveByForm = new Ext.form.ComboBox({
id: 'trip-arrive-form',
name: 'arriveBy',
hiddenName: 'arriveBy',
style: {position:'relative', left:'12px'}, // style attribute i added
fieldLabel: this.locale.tripPlanner.labels.when,
store: this.m_arriveByStore,
value: this.m_arriveByStore.getAt(0).get('opt'),
displayField: 'text',
valueField: 'opt',
anchor: this.FIELD_ANCHOR,
mode: 'local',
triggerAction: 'all',
editable: false,
allowBlank: false,
lazyRender: false,
typeAhead: true,
forceSelection: true,
selectOnFocus: true,
});
it works when i add only one style rule, ut if i added more than one then it stops working, feel like ayntax error but can u help me in this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过使用基本的
CSS
格式?而不是只是
我的一天结束的想法。
您似乎想要调整 ComboBox 的位置,我将通过配置包含 ComboBox 的组件的布局来做到这一点。但由于您只显示有关 ComboBox 的代码,我不知道该解决方案是否对您有帮助。
Have you tried using basic
CSS
formatting?instead of
Just my the end of the day idea.
You seem to want to adjust the position of the ComboBox and I would do that by configuring the
layout
of the component containing the ComboBox. But since you only show code concerning the ComboBox, I don't know if that solution will help you.