Extjs - 当复合字段内的项目增长/调整大小时如何调整兄弟姐妹的位置
我有一个包含两个文本字段项的复合字段。第一个文本字段的 Growth 属性设置为 true。当第一个文本字段的宽度自动调整大小时,它会与右侧的字段重叠。我希望后续项目随着前一个字段的增长而调整/移动其位置到右侧。 例如,
new Ext.form.CompositeField({
autoHeight: true
, autoWidth: true
, items:[{
xtype:'textfield'
, flex: 1
, growMax: 125
, growMin: 80
, width: 80
, grow: true
, listeners: {
'autoSize': function () {
// what should I do here?? i tried accessing the
// ownerCt syncSize() but didn't work
}
}}
, {
xtype:'textfield'
, flex: 1
, width: 80
}]
});
提前谢谢您。
I have a composite field with two textfield items. The first textfield's grow property is set to true. When the first textfield's width autoresize, it overlaps the field to the right. I would like the succeeding items to adjust/move it's position to the right as the preceeding field grows.
e.g
new Ext.form.CompositeField({
autoHeight: true
, autoWidth: true
, items:[{
xtype:'textfield'
, flex: 1
, growMax: 125
, growMin: 80
, width: 80
, grow: true
, listeners: {
'autoSize': function () {
// what should I do here?? i tried accessing the
// ownerCt syncSize() but didn't work
}
}}
, {
xtype:'textfield'
, flex: 1
, width: 80
}]
});
Thank you in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这似乎是 extjs 的错误。但是,我找到了解决方法:
这是 fiddle
This seem to be bug of extjs. However, I 've found workaround:
Here is fiddle