Results 1 to 1 of 1

Thread: adding left padding to button

  1. #1

    Default adding left padding to button

    how can I add left padding to button. please find attach image and code below.
    -------------------------------------------------------------------------------

    // JScript File
    Application.CacheForm = Ext.extend(Ext.form.FormPanel,
    {
    border:false ,initComponent:function()
    {

    /////// config start
    var jetnexus = new Ext.data.SimpleStore({
    fields: ['id', 'Protocol'],
    data : [['1','--not Cached'],['2','Images']]
    });
    var jetnexus1 = new Ext.data.SimpleStore({
    fields: ['id', 'Protocol1'],
    data : [['1','Include'],['2','Exclude']]
    });
    var jetnexus2 = new Ext.data.SimpleStore({
    fields: ['id', 'Protocol2'],
    data : [['1','directory'],['2','file'],['3','anything starting'],['4','anything ending'],['4','anything containing'],['5','exact match'],['6','All JPEG Images'],['7','All GIF Images'],['8','All Bitmap Images'],['9','All PNG Images'],['10','All HTML Pages']]
    });
    var config = {
    layout:'form',
    frame:'true',
    url: '../Submit.htm<#SessionID>',
    width: 590,
    bodyStyle:'padding:25px',
    defaults: {width: 230},
    labelWidth: 300,
    labelAlign:'right',
    defaultType: 'textfield',
    items: [{
    fieldLabel: 'Maximum Cache Size (M',
    name: 'MCS',
    allowBlank:true,
    xtype:'textfield',
    value: '',
    anchor:'90%'

    },{
    fieldLabel: 'Desired Cache Size (M',
    name: 'MCS',
    allowBlank:true,
    inputType:'password',
    xtype:'textfield',
    value: 'fdsdfsdf',
    anchor:'90%'
    },{
    fieldLabel: 'Default Caching Time (D/HH:MM)',
    name: 'MCS',
    allowBlank:true,
    xtype:'textfield',
    value: '',
    anchor:'90%'

    },{
    fieldLabel: 'Cachable HTTP Response Codes',
    name: 'MCS',
    allowBlank:true,
    xtype:'textfield',
    value: '',
    anchor:'90%'

    },{
    fieldLabel: 'Cache Checking Timer (D/HH:MM)',
    name: 'MCS',
    allowBlank:true,
    xtype:'textfield',
    value: '',
    anchor:'90%'

    },{
    fieldLabel: 'Cache-Fill Count',
    name: 'MCS',
    allowBlank:true,
    xtype:'textfield',
    value: '',
    anchor:'90%'

    },{
    xtype:'label',
    html:'
    <hr/>',
    width:'89.5%'
    },{

    xtype:'tbbutton',
    text:'Update',
    width:'60',
    name:'update_time',
    style:'margin-left:415;margin-bottom:30',
    formBind:true,
    scope:this,
    handler: this.submit

    },{

    xtype:'tbbutton',
    fieldLabel: 'Force a check on the cache size now',
    text:'Check Cache',
    width:'85',
    name:'update_time',
    //style:'margin-left:415;margin-bottom:30',
    formBind:true,
    scope:this,
    handler: this.submit

    },{

    xtype:'tbbutton',
    labelWidth: 320,
    fieldLabel: 'Remove all items from the cache to restart caching',
    text:'Clear Cache',
    width:'85',
    name:'update_time',
    style:'margin-bottom:10',
    formBind:true,
    scope:this,
    handler: this.submit

    },{
    xtype:'label',
    html:'
    <hr/>',
    style:'margin-bottom:20',
    width:'89.5%'
    },{
    fieldLabel: 'Cache-Fill Count',
    name: 'MCS',
    allowBlank:true,
    xtype:'textfield',
    value: '',
    anchor:'90%'
    },{
    xtype: 'combo',
    name: 'genre',
    displayField:'Protocol',
    mode: 'local',
    store: jetnexus ,
    anchor:'90%'
    },{
    xtype:'label',
    width:'100%',
    style:'margin-left:168',
    formBind:true,
    html: '
    <br/><br/><b>Other Domains Served</b>'
    },{
    fieldLabel: 'Domains Name',
    name: 'MCS',
    allowBlank:true,
    xtype:'textfield',
    value: '',
    style:'margin-bottom:10',
    anchor:'90%'
    },{
    xtype:'label',
    html:'
    <hr/>',
    width:'89.5%'
    },{

    xtype:'tbbutton',
    text:'Update',
    width:'60',
    name:'update_time',
    style:'margin-left:415;margin-bottom:20',
    formBind:true,
    scope:this,
    handler: this.submit
    },{
    xtype:'label',
    width:'100%',
    style:'margin-left:98',
    formBind:true,
    html: '
    <b>Cache Content Selection Rulebases</b>'
    },{
    fieldLabel: 'Name',
    name: 'MCS',
    allowBlank:true,
    xtype:'textfield',
    value: '',
    anchor:'90%'
    },{
    fieldLabel: 'Description',
    name: 'MCS',
    allowBlank:true,
    xtype:'textfield',
    value: '',
    anchor:'90%'
    },
    {
    xtype: 'combo',
    name: 'genre',
    displayField:'Protocol1',
    mode: 'local',
    store: jetnexus1 ,
    anchor:'90%'
    },{
    xtype: 'combo',
    name: 'genre',
    displayField:'Protocol2',
    mode: 'local',
    store: jetnexus2 ,
    anchor:'90%'
    }
    ]};
    Ext.apply(this, Ext.apply(this.initialConfig, config));
    // });

    Application.CacheForm.superclass.initComponent.apply(this, arguments);

    } // eo function initComponent

    ,onRender:function()
    {
    // this.store.load();
    Application.CacheForm.superclass.onRender.apply(this, arguments);

    } // eo function onRender


    ,submit:function()
    {
    this.getForm().submit
    (
    {
    standardSubmit: true,
    url : this.url,
    success : this.onSuccess,
    failure : this.onFailure
    }
    );
    }
    ,onSuccess:function(form, action)
    {
    Ext.MessageBox.alert("Success","Form Submitted SuccessFully");
    }

    ,onFailure:function(form, action)
    {
    Ext.MessageBox.alert("Failure","Form could not be Submitted.");
    }

    });

    Ext.reg('Cache', Application.CacheForm);
    Attached Images Attached Images

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. left padding for combo box
    By naikgk in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 19 Oct 2010, 11:02 PM
  3. ComboBox left padding
    By andreacfm in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 17 Sep 2009, 11:07 PM
  4. Replies: 2
    Last Post: 2 Sep 2008, 2:02 PM
  5. Replies: 2
    Last Post: 8 Jan 2008, 10:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •