View Full Version : hbox ratio with hidden fields occuping width

14 Nov 2012, 3:57 AM
extjs 4.1.1.a

I have a problem , in my hbox there is a last hidden field, but in screen it occupies some with after the last visible field. How can i config to be really "hidden" and "width=0" ??

xtype: 'fieldcontainer',
fieldLabel: '',
labelSeparator: '',
labelWidth: 0,
layout: {
type: 'hbox',
pack: 'ratio',
align: 'top'
anchor: '100%',
defaultType: 'cesitextfield',
fieldDefaults: {
labelAlign: 'right',
labelStyle: 'font-weight:bold;'
defaults: {
margins: '0 5 0 0'

items: [{
name: 'matric_tipo_ic',
xtype: 'combobox',
fieldLabel: gt.dgettext('esiacademia','Tipo'),
labelAlign: 'right',
labelWidth: 75,
store: Ext.create('Ext.data.Store', {
fields: ['clave', 'nombre'],
data : [
{ "clave": "I", "nombre": gt.dgettext('esicontactos','Individual'), "iconCls": 'esicontactos-icono_contacto_persona' },
{ "clave": "C", "nombre": gt.dgettext('esicontactos','Colectiva'), "iconCls": 'esicontactos-icono_contacto_entidad' }
displayField: 'nombre',
valueField: 'clave',
queryMode: 'local',
editable: false,
fieldCls: 'campo_obligatorio',
allowBlank: false,
width: 175
// Alumno asignado a la facturación de la matricula
name: 'escoge_matric_alumno_nombre_fac',
xtype: 'cesifieldtriggerescoge',
fieldLabel: gt.dgettext('esiacademia','Alumno'),
labelAlign: 'right',
labelWidth: 90,
flex: 1,
windowEscoge: me.windowEscogeAlumnoAsociado,
emptyText: gt.dgettext('esiacademia','Introduzca id o nombre'),
fieldCls: 'campo_obligatorio',
allowBlank: false,
forzarMayusculas: false,
allowBlank: false,
submitValue: true
name: 'matric_alumno_id_fac',
xtype: 'hiddenfield',
width: 0,
submitValue: true

14 Nov 2012, 4:12 AM
Maybe it calculates the default margin (top, right, bottom, left) in the fieldcontainer.

right is default set on 5 in your case.