1. #1
    Ext User
    Join Date
    Aug 2010
    Posts
    48
    Vote Rating
    0
    PatrickS is on a distinguished road

      0  

    Default padding Ext.form.TextField

    padding Ext.form.TextField


    Hi,

    For one field in my form I would like to bring the label and the inputfield closer together. I can manipulate the labelstyle and the input style, but I cant get them closre together. Does anyone know how I can do this? (without changing the general style, because it should only affect 1 textfield)

    Patrick

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    83
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    labelWidth and optionally also labelPad

  3. #3
    Sencha User laurentParis's Avatar
    Join Date
    Aug 2010
    Location
    paris
    Posts
    246
    Vote Rating
    2
    laurentParis is on a distinguished road

      0  

    Default


    You need labelStyle to set padding-right to 0px

    PHP Code:
    new Ext.FormPanel({
       
    labelAlign'right',
      
    labelSeparator'',
      
    labelPad0,
      
    defaults: {
        
    labelStyle'padding-right: 0px;'          // << for all field, move it on one particular field if you prefer
      
    },
      ... 

Similar Threads

  1. form padding-left problem ?
    By bsahin in forum Ext 2.x: Help & Discussion
    Replies: 7
    Last Post: 9 Jan 2011, 11:36 PM
  2. Witch is faster Ext.form.TextField or xtype:'textfield' ?
    By lassaad in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 7 Sep 2009, 5:12 AM
  3. Extending Ext.form.TextField - new form field
    By archmisha in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 8 May 2009, 5:23 AM
  4. Replies: 0
    Last Post: 23 Sep 2008, 11:53 AM

Thread Participants: 2