1. #1
    Sencha User
    Join Date
    May 2013
    Posts
    6
    Vote Rating
    0
    uia9020 is on a distinguished road

      0  

    Default Unanswered: How to group sencha touch 2 radio fields

    Unanswered: How to group sencha touch 2 radio fields


    Here is the preview of my code what i get is this I want to group my radio fields like given below. How can I do it? what i need is this . Is there any plugin to do this?

    This is my sencha touch 2 code:

    Code:
    Ext.define('10.view.Main', {
        extend : 'Ext.form.Panel',
    
        requires : ['Ext.form.FieldSet'],
    
        config : {
            title      : 'Main',
            scrollable : 'both',
            editable   : false,
            items      : [
                {
                    xtype : 'fieldset',
                    items : [
                        {
                            xtype   : 'radiofield',
                            name    : 'color',
                            value   : 'red',
                            label   : 'Red',
                            checked : true
                        },
                        {
                            xtype : 'radiofield',
                            name  : 'color',
                            value : 'blue',
                            label : 'Blue'
                        }
                    ]
                }
            ]
        }
    });
    Last edited by mitchellsimoens; 19 May 2013 at 6:11 AM. Reason: fixed code

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,525
    Vote Rating
    872
    Answers
    3564
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      1  

    Default


    What part of that are you wanting? The checkmark?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    May 2013
    Posts
    6
    Vote Rating
    0
    uia9020 is on a distinguished road

      0  

    Default


    No I need the other part. I need to locate Red and Blue next to the label "Color". like this Untitled.jpg

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,525
    Vote Rating
    872
    Answers
    3564
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    I see, you will need to nest 2 text fields in an hbox layout container for each row. The first field has the label, second does not.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User
    Join Date
    Jul 2013
    Posts
    1
    Vote Rating
    0
    narasimha d is on a distinguished road

      0  

    Default grouping sencha touch fields

    grouping sencha touch fields


    Ext.define('MyApp.view.RadioContainer', {
    extend: 'Ext.Container',
    alias: 'widget.RadioContainer',

    config: {
    height: '25%',
    layout: {
    type: 'hbox'
    },
    items: [
    {
    xtype: 'label',
    flex: 1,
    html: 'Colurs:',
    style: 'text-align:center;position:relative;top:25%;'
    },
    {
    xtype: 'container',
    flex: 3,
    items: [
    {
    xtype: 'radiofield',
    label: 'Red',
    name: 'red'
    },
    {
    xtype: 'radiofield',
    label: 'Blue',
    name: 'blue'
    }
    ]
    }
    ]
    }

    });