1. #1
    Sencha User
    Join Date
    Feb 2010
    Posts
    357
    Vote Rating
    4
    Answers
    15
    maneljn is on a distinguished road

      0  

    Default Answered: hbox ratio with hidden fields occuping width

    Answered: hbox ratio with hidden fields occuping width


    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" ??

    Code:
                                        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
                                        }]
    Attached Images
    -------------------
    Manel Juàrez

  2. Maybe it calculates the default margin (top, right, bottom, left) in the fieldcontainer.

    right is default set on 5 in your case.

  3. #2
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,118
    Vote Rating
    30
    Answers
    85
    tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about

      1  

    Default


    Maybe it calculates the default margin (top, right, bottom, left) in the fieldcontainer.

    right is default set on 5 in your case.

Thread Participants: 1