1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    35
    Answers
    2
    Vote Rating
    0
    ericchaves is on a distinguished road

      0  

    Default Unanswered: Need help to properly put a radio field with label in a line of a fieldset

    Unanswered: Need help to properly put a radio field with label in a line of a fieldset


    Hi folks,

    I have a fieldset with several textfields and two radio fields in the same row. Using each field's label I added a div that I use to draw an icon for each field. My problem is that I can't make the label area of the radio row to have the same size of the rest of the fields in the fieldset.

    Any ideas on how could I achieve this?

    Thanks in advance,

    Eric.

    ps.: this is the code for my fieldset
    Code:
    
    Ext.define('myapp.view.Account.IdentityFieldset', {
        extend: 'Ext.form.FieldSet',
        xtype: 'user-identity-fieldset',
        requires: [
            'Ext.form.FieldSet',
            'Ext.field.Email',
            'Ext.field.Number',
            'Ext.field.Select',
            'Ext.field.Radio'
        ],
    
    
        config:{
            ui:'simple',
            xtype: 'fieldset', 
            items: [
                {
                    xtype: 'textfield',
                    itemId: 'txt-fullname',
                    name: 'fullname',
                    label: '<div id="myapp-field-icon-fullname" class="edit-icon ui-field-icon"></div>',
                    placeHolder: 'Nome completo'
                },
                {
                    xtype: 'emailfield',
                    itemId: 'txt-email',
                    name: 'email',
                    label: '<div id="myapp-field-icon-email" class="at-icon ui-field-icon"></div>',
                    placeHolder: 'e-mail'
                },
                {
                    xtype: 'textfield',
                    itemId: 'txt-cpf',
                    name: 'cpf',
                    label: '<div id="myapp-field-icon-cpf" class="card-icon ui-field-icon"></div>',
                    placeHolder: 'CPF'
                },
                {
                    xtype: 'textfield',
                    itemId: 'txt-rg',
                    name: 'rg',
                    label: '<div id="myapp-field-icon-rg" class="card-icon ui-field-icon"></div>',
                    placeHolder: 'RG'
                },
                {
                    xtype: 'textfield',
                    itemId: 'txt-birthdate',
                    name: 'birthdate',
                    label: '<div id="myapp-field-icon-birthdate" class="child-icon ui-field-icon"></div>',
                    placeHolder: 'Data de nascimento',
                },
                {
                    xtype: 'container',
                    layout : {
                        type  : 'hbox',
                        align : 'stretch'
                    },
                    defaults: {
                        xtype: 'radiofield'
                    },
                    items: [
                    {
                        itemId: 'txt-gender',
                        name: 'gender-label',
                        label: '<div id="myapp-field-icon-gender" class="circle-icon ui-field-icon"></div>',
                        xtype: 'textfield'
                    },
                    {
                        name: 'gender',
                        label: 'Masc',
                        value: 'M'
                    }, {
                        name: 'gender',
                        label: 'Fem',
                        value: 'F'
                    }]
                }
            ]
        }
    });

  2. #2
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,394
    Answers
    148
    Vote Rating
    22
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    You can try to set the "labelWidth" property of the "txt-gender" textfield.
    Otherwise, you can use my FieldContainer ux.
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    CEO at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    http://www.tux-components.com/


  3. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    35
    Answers
    2
    Vote Rating
    0
    ericchaves is on a distinguished road

      0  

    Default


    Thanks Andrea! I'll try your component. Thanks for sharing!

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar