I have a set of data in my dataStore, and I output my data using textfields within containers in a .js view. I also disabled the fields only to show data and be uneditable. I was wondering if there are any alternatives to using 'xtype: textfield', and 'xtype: textareafield' ?
With this question entailed, I'm trying to create a container with two components using hbox as such an alternative, and this is the code that I have of the following:
var formContainer1 = new Ext.Container({
width: '100%',
height: '65%',
layout: {
type: 'vbox',
// type: 'hbox',
align: 'stretch',
},
defaults: {
labelAlign:'left',
// labelWidth:'30%',
labelWidth:'25%',
},
items: [
{
bodyStyle: "background-color: #52ABD5;", //Color = Light Blue
html: '<font face="Helvetica" size="4" color="white" ><p>Information</p>'
},
{
xtype: 'textfield',
// xtype: 'component',
name: 'Description',
disabled: true,
label: 'Desc',
},{
xtype: 'textfield',
// xtype: 'component',
name: 'Number',
disabled: true,
label: 'ANumber',
id: 'ANumber',
},{
xtype: 'textareafield',
// xtype: 'component',
name: 'directions',
disabled: true,
label: 'Directions',
height: 'auto',
// defaults: {
//required: true,
// labelAlign: 'left',
// labelWidth: '100%'
// },
},
],
/* dockedItems: [
{
layout: 'hbox',
xtype: 'toolbar',
dock: 'top',
title: 'Information',
// scroll: 'horizontal',
}
]*/
});
Now this code works just fine, except i don't want to use 'textfield' or 'textareafield'. I'm still using those because I tried using xtype: component, but it didn't work. Also when I tried this in hbox layout, it didn't show up like I wanted it to (row after row). I'm pretty sure I'm just not understanding the "components using hbox" part because yeah I want this container to look really close to this:
Img url: http://farm3.staticflickr.com/2683/5852914556_b2886e3363.jpg
(note: referring to the right most iphone picture w/ the containers)
Please clarify for me on the "w/ 2 components usnig hbox" part. Thanks!
By the way: http://www.sencha.com/forum/showthread.php?186243-Alternatives-to-textfield&p=759843#post759843
My username on that post: kevinjset. This was the original post that I posted on Sencha touch forums asking the same question, I just wanted to see if you guys on Stack Overflow! can help me out too! Thanks, appeciated.