1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    27
    Vote Rating
    0
    Answers
    1
    atula_a1 is on a distinguished road

      0  

    Default 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.

  2. #2
    Sencha User
    Join Date
    Mar 2012
    Posts
    104
    Vote Rating
    0
    Answers
    4
    izak18 is on a distinguished road

      0  

    Default


    Try something like this:

    Code:
    xtype: 'textfield',
    label: 'User',
    labelWidth: '35%'

  3. #3
    Sencha User
    Join Date
    Aug 2011
    Posts
    27
    Vote Rating
    0
    Answers
    1
    atula_a1 is on a distinguished road

      0  

    Default


    Hi izak18,
    It is set with for label of textfield. It isn't set height

  4. #4
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,333
    Vote Rating
    85
    Answers
    124
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default


    Hi,

    Try this:

    Code:
                {
                    xtype: 'textfield',
                    style: {
                        width: '95%',
                        marginBottom: '10px'
                    }
                }
    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.

    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...

    Code:
    YourTextField.setHeight(200);
    http://docs.sencha.com/touch/1-1/#!/...thod-setHeight
    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.

  5. #5
    Sencha User
    Join Date
    Aug 2011
    Posts
    27
    Vote Rating
    0
    Answers
    1
    atula_a1 is on a distinguished road

      0  

    Default


    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

  6. #6
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,333
    Vote Rating
    85
    Answers
    124
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default


    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.

  7. #7
    Sencha User
    Join Date
    Aug 2011
    Posts
    27
    Vote Rating
    0
    Answers
    1
    atula_a1 is on a distinguished road

      0  

    Default


    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
    }


    }

  8. #8
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,333
    Vote Rating
    85
    Answers
    124
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default 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-maxHeight
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  9. #9
    Sencha User
    Join Date
    Aug 2011
    Posts
    27
    Vote Rating
    0
    Answers
    1
    atula_a1 is on a distinguished road

      0  

    Default


    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

Thread Participants: 2