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.
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
}]
});
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 ...
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 ...
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-...