admin管理员组文章数量:1395451
What I try to achieve is something alike this:
Only then in a Sencha Touch application.
I have achieved an input field with a button next to it but not a button inside of a input field.
Is there a way to get this functionality in Sencha Touch 2? (without using css to float the button above the input.
What I try to achieve is something alike this:
Only then in a Sencha Touch application.
I have achieved an input field with a button next to it but not a button inside of a input field.
Is there a way to get this functionality in Sencha Touch 2? (without using css to float the button above the input.
1 Answer
Reset to default 9you can achieve this, let's try:
{
xtype: 'textfield',
ponent: {
xtype: 'container',
layout: 'hbox',
items: [
{
xtype: 'textfield',
flex: 3,
},
{
xtype: 'button',
flex: 1,
text: 'test'
}
]},
},
Explanation: ponent
is a special config for input fields and by default, it's set to {xtype: "input", type: "text"}
, that's the key of this work-around. Scale your textfield
vs button
widths with flex
config
Hope it helps. :)
本文标签: javascriptButton inside of an input field Sencha Touch 20Stack Overflow
版权声明:本文标题:javascript - Button inside of an input field Sencha Touch 2.0 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744582000a2613976.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论