Title: Button inside of an input field Sencha Touch 2.0
Tags: javascript;sencha-touch-2
Question: 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.

Here is the accepted answer: you can achieve this, let's try:
xtype: 'textfield',
component: {
xtype: 'container',
layout: 'hbox',
items: [
{
xtype: 'textfield',
flex: 3,
},
{
xtype: 'button',
flex: 1,
text: 'test'
}
]},
Explanation: component 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. :)
Comment for this answer: Shouldn't the first inner item's xtype be "input" instead of "textfield"?


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2012:00:04/12/12', 'FavoriteCount': 2.0, 'PostTypeId': 1, 'Tags': '<javascript><sencha-touch-2>', 'Title': 'Button inside of an input field Sencha Touch 2.0', 'ViewCount': 2850, 'id': 10119021, 'user_AboutMe': '', 'user_AccountId': 1226394.0, 'user_DisplayName': 'Rick Hoving', 'user_Reputation': 3565.0, 'user_Views': 412.0, 'user_id': 1191841.0}}