-
24 May 2012 1:38 AM #1
Unanswered: How to set height for textfield , emailfield?
Unanswered: How to set height for textfield , emailfield?
Hi everybody,
I was trying set height for textfield, emailfield in my form panel.
I tried set value for properties "height", "maxHeight", "fieldCls" .But it cannot apply
Somebody can make this? Please let me know
Thanks.
-
24 May 2012 6:05 PM #2
Try something like this:
Code:xtype: 'textfield', label: 'User', labelWidth: '35%'
-
24 May 2012 6:36 PM #3
Hi izak18,
It is set with for label of textfield. It isn't set height
-
24 May 2012 11:11 PM #4Sencha - Community Support Team
- Join Date
- May 2012
- Location
- Istanbul
- Posts
- 1,331
- Vote Rating
- 77
- Answers
- 124
Hi,
Try this:
when you apply a rule to an element, only to find it not having any effect and applying other rules and they are working fine, but certain rules just don’t seem to work.Code:{ xtype: 'textfield', style: { width: '95%', marginBottom: '10px' } }
In that case, the problem is usually that you have already defined rules for this element elsewhere using a more specific selector.
If the above solution fails,
Try to use setHeight() method...
http://docs.sencha.com/touch/1-1/#!/...thod-setHeightCode:YourTextField.setHeight(200);
Last edited by sword-it; 24 May 2012 at 11:14 PM. Reason: misspeling
sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.
-
25 May 2012 2:24 AM #5
Hi swort-it,
Your code use to set distance between textfield components.
But i want descrease of height textfields on my panel to all component are in a screen of iPhone and user doesn't need touch down his iPhone.
It seems that mini height of textfiled is 45px, we cannot reduce this height .
Example
{
xtype: 'textfield',
id: 'setpasswordId',
name : 'setpassword',
label: 'Set Password',
labelWidth: '100%',
useClearIcon: true,
height: 30 // it cannot effect
}
Anyway thank for your comment
-
25 May 2012 2:30 AM #6Sencha - Community Support Team
- Join Date
- May 2012
- Location
- Istanbul
- Posts
- 1,331
- Vote Rating
- 77
- Answers
- 124
Hi!
style: { width: '95%', marginBottom: '10px', color:'red',... }
I have just shown to you that you can give more CSS properties by this config...not supposed to do margins between elements......
Anyway, if you want to reduce the minimum height for your text field , you should use minHeight config.
It will override any previous min heights done by layout managers...
Just use:-
minHeight:30
http://docs.sencha.com/touch/1-1/#!/...-cfg-minHeight
sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.
-
25 May 2012 6:48 PM #7
Hi Swort-it
I understand your idea
But not always document of sencha is correct. You can set height greater than 45px, but cannot smaller 45px
The last i tried use property minHeigth , style . Even I tried use developer tool of Chrome to override css of child div of a textfield. But it cannot effect.
Ex code:
{
xtype: 'textfield',
id: 'namesetupId',
name : 'namesetup',
width: '95%',
placeHolder: 'Name',
height: 30,
minHeight: 30,
style : {
marginLeft : '2.5%',
marginBottom: '5px',
borderRadius: '5px',
height:30
}
}
-
25 May 2012 9:48 PM #8Sencha - Community Support Team
- Join Date
- May 2012
- Location
- Istanbul
- Posts
- 1,331
- Vote Rating
- 77
- Answers
- 124
try maxHeight
try maxHeight
Hi!
try giving maxHeight:30 for your textfield...it should overwrite the existing one...
http://docs.sencha.com/touch/1-1/#!/...-cfg-maxHeightsword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.
-
5 Jun 2012 11:50 PM #9
Swort
Previously post this issue , i trying use properties : height, minHeight, maxHeight.. and override css class of child component but it height of textfield cannot less 45.
I'm sure about this.
Anyway thank you


Reply With Quote