-
20 Apr 2012 3:18 AM #1
Unanswered: Text Field CSS Bug with Multi word label
Unanswered: Text Field CSS Bug with Multi word label
Hi,
I have a form with 3 columns. A checkbox, a textfield and another checkbox.
When the label of the checkbox is more than a single word the textfield is getting a weird css error.
My Code :
Code:{ id : 'q2Pulses', instructions : 'Can select MULTIPLE answers', title : '<font size=3>Question 2(a)(b)(c). : From these crop groups, which crop did you mainly cultivate in 2011? For selected crops, please tell me in how many acres were the crops grown? Which crops were grown by your farm in 2010</font>', items : [ { layout : 'vbox', defaults : {width : '100%', layout : 'hbox', defaults : {height : '100%'}}, items : [ { items : [ //For a sort of header on the each column {xtype : 'spacer', width: '25%', style : 'background-color:#C0C0C0'}, {xtype : 'field', labelWidth : '100%', label: 'Crops in 2011',width: '25%'}, {xtype : 'field', labelWidth : '100%', label: 'Acreage (in Acres)', width : '25%'}, {xtype : 'field', labelWidth : '100%', label: 'Crops in 2010', width: '25%'}, ] }, { items : [ // columns to fill {xtype : 'checkboxfield', name : 'q2a5',labelWidth : '60%', label: 'Bengal Gram', value : '5', width: '50%'}, {xtype : 'textfield', name : 'q2b5', width : '25%'}, //error in the CSS Here {xtype : 'checkboxfield', name : 'q2c5', value : '1', width: '25%'}, ] }, { items : [ {xtype : 'checkboxfield', name : 'q2a6',labelWidth : '50%', height: '100%', label: 'Black & Green Gram', value : '6', width: '50%'}, {xtype : 'textfield', name : 'q2b6', width : '25%'}, //error in the CSS Here {xtype : 'checkboxfield', name : 'q2c6', value : '2', width: '25%'}, ] }, { items : [ {xtype : 'checkboxfield', name : 'q2a7',labelWidth : '50%', label: 'Red Gram', value : '7', width: '50%'}, {xtype : 'textfield', name : 'q2b7', width : '25%'}, //error in the CSS Here {xtype : 'checkboxfield', name : 'q2c7', value : '3', width: '25%'}, ] }] } ] }, //End of Q2abc
The error looks like this :
textfield error.jpg
If you look under the "Acreage (in Acres)" column you can see the CSS error.
The error is that instead of the textfield showing a blank white space as the background, it now shows a dived space. Half the field is the normal white css, the rest is greyed out and looks ugly.
Not sure what the error is here
Help !!!!
-
23 Apr 2012 7:41 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
- Answers
- 3108
Each row is a contianer and it should use hbox layout with align stretch. Each item them should use the flex config.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
29 Apr 2012 9:39 PM #3
No thats not working either. Tried that already. Looks exactly the same as it does now.
Also if you notice, the more the words in the label, the greater the grey ugly area in the textfield.
Any other ideas ??
-
1 May 2012 7:22 PM #4
Found a solution finally...
Instead of using a label in the first checkbox field, Im using a "label" in the "field" component, and then the checkbox, textfield & the second checkbox are empty without labels


Reply With Quote