JavaScript How to reduce space between label and text box in extjs? reduce space between bullet and text,reduce space between lines

I want to reduce space between label and text box, you can see in bellow image, I used Ext.form.field.Text control of ext JS. Please see bellow code for this control.

this.temp1min = new Ext.form.field.Text({
            xtype: 'textfield',
            /*  *///labelAlign: 'left',
            //labelWidth: 60,
            //width: '7%',
            //labelStyle: 'padding: 10px 10px;',
            //padding:'0 '
            fieldLabel: 'T1 Min',
            blankText: fleet.Language.get('_FLEET_REQUIRED_ERROR_'),
            //allowBlank: false,
            name: 'temp1min'
        });
        this.temp1max = new Ext.form.field.Text({
            xtype: 'textfield',
            //labelAlign: 'left',
            //labelWidth: 30,
            //width: '6%',
            fieldLabel: 'T1 Max',
            blankText: fleet.Language.get('_FLEET_REQUIRED_ERROR_'),
            // allowBlank: false,
            name: 'temp1max'
        });

And UI, Please see below image. enter image description here

Answer:1

You can use labelWidth:'auto';

The labelWidth of the fieldLabel in pixels. Only applicable if the labelAlign is set to "left" or "right".

Here I have created an sencha fiddle demo. Hope this will help you to solve your problem.

Ext.create('Ext.form.Panel', {
    title: 'Label width example',
    width: '100%',
    bodyPadding: 10,
    renderTo: Ext.getBody(),
    defaults: {
      xtype: 'textfield',
        labelWidth: 'auto',
        margin: '0 5',
        allowBlank: false // requires a non-empty value
    },
    layout: 'hbox',
    items: [{
        fieldLabel: 'T1 Min',
        name: 'temp1min'
    },{
        fieldLabel: 'T1 Max',
        name: 'temp1min'
    }, {
        name: 'name',
        fieldLabel: 'Name',
    }, {
        name: 'email',
        fieldLabel: 'Email Address',
        vtype: 'email' // requires value to be a valid email address format
    }]
});
Answer:2

I am using the Chart.js library to display some values in stacked bars but I am struggling in trying to find out how to display the values inside of the bars, that is, Right now, I have the following ...

I am using the Chart.js library to display some values in stacked bars but I am struggling in trying to find out how to display the values inside of the bars, that is, Right now, I have the following ...

  1. display variable values inline while debugging

I'm trying to override the default TinyMce 4 spellchecker method "markErrors", but without success. I've already tried: // on editor init... editor.plugins.spellchecker.markErrors = function() { ...

I'm trying to override the default TinyMce 4 spellchecker method "markErrors", but without success. I've already tried: // on editor init... editor.plugins.spellchecker.markErrors = function() { ...

I'm surprised that the following code works: while(fred !== "stop"){ var fred = prompt("Should I stop or go?") }; I'd understand this in a do while loop: do { code to be executed at least ...

I'm surprised that the following code works: while(fred !== "stop"){ var fred = prompt("Should I stop or go?") }; I'd understand this in a do while loop: do { code to be executed at least ...

  1. javascript while loop break
  2. javascript while loop example
  3. javascript while loop continue
  4. javascript while loop with delay
  5. javascript while loop wait
  6. javascript while loop with timeout
  7. javascript while loop mdn
  8. javascript while loop async
  9. javascript while loop wait for promise
  10. javascript while loop countdown
  11. javascript while loop with multiple conditions
  12. javascript while loop synchronous
  13. javascript while loop through array
  14. javascript while loop await
  15. javascript while loop promise
  16. javascript while loop even numbers
  17. javascript while loop one line
  18. javascript while loop two conditions
  19. javascript while loop not breaking
  20. javascript while loop not equal

I have a simple requirement: Based on the response of a user on a particular yes no question, show him another question. The issue is I am using Bootstrap forms so all my div classes are named form-...

I have a simple requirement: Based on the response of a user on a particular yes no question, show him another question. The issue is I am using Bootstrap forms so all my div classes are named form-...