1. #1
    Ext User
    Join Date
    Aug 2010
    Posts
    32
    Vote Rating
    0
    eudoxem is on a distinguished road

      0  

    Default Radiogroup radios in multiple lines and columns

    Radiogroup radios in multiple lines and columns


    Hello,

    Is there a way to set radioboxes (Radio) contained in the same radiogroup (RadioGroup) on multiple lines and columns like displayed on the "Post Icons" section of this site?

    What I'm getting now is a one row horizontal/vertical alignment depending on the choosen orientation. By using layouts (ColumnLayout), only the last column is displayed.

    Any help will be appreciated

  2. #2
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Nothing like this is implemented. You can for example use an LayoutContainer with ab AbsoluteLayout and position the radios as needed.

  3. #3
    Ext User
    Join Date
    Aug 2010
    Posts
    32
    Vote Rating
    0
    eudoxem is on a distinguished road

      0  

    Default


    Ok and thanks for the quick reply. I read the Javadoc and search some use of AbsoluteLayout but I don't find anything. Can you please give me some sample of using this layout?

  4. #4
    Sencha User
    Join Date
    Dec 2010
    Posts
    8
    Vote Rating
    0
    jarik_bsu is on a distinguished road

      0  

    Default Use two radioGroups that are binded to one field

    Use two radioGroups that are binded to one field


    You are going to do something like this?
    rgM.jpg

    Code:
            final RadioGroup loanRateType = new RadioGroup("loanRateType");
            loanRateType.setFieldLabel(Msg.MSG.loanIs());
            final RadioGroup loanRateType2 = new RadioGroup("loanRateType");
            loanRateType2.setLabelSeparator("");
    
            final Radio fixed = new Radio();
            fixed.setData("value", RateType.FIXED);
            fixed.setBoxLabel(Msg.MSG.fixed());
            loanRateType.add(fixed);
    
            final Radio variable = new Radio();
            variable.setData("value", RateType.VARIABLE);
            variable.setBoxLabel(Msg.MSG.variable());
            loanRateType.add(variable);
    
            final Radio interestOnly = new Radio();
            interestOnly.setData("value", RateType.INTEREST_ONLY);
            interestOnly.setBoxLabel(Msg.MSG.interestOnly());
            loanRateType2.add(interestOnly);
    
            final Radio other = new Radio();
            other.setData("value", RateType.OTHER);
            other.setBoxLabel(Msg.MSG.other());
            loanRateType2.add(other);
            leftTop.add(loanRateType, FORM_DATA);
            leftTop.add(loanRateType2, FORM_DATA);
    Works well.
    added - I have to add the 2 change listeners and have to set false to opposed radios in this listeners to have this listeners fires well.
    Code:
            loanRateType.addListener(Events.Change, new Listener<BaseEvent>() {            
                @Override
                public void handleEvent(BaseEvent baseEvent) {
                   //some code
                   interestOnly.setValue(false);
                   other.setValue(false);
                }
            });
    
    
            loanRateType2.addListener(Events.Change, new Listener<BaseEvent>() {
                @Override
                public void handleEvent(BaseEvent baseEvent) {
                    //some code
                    fixed.setValue(false);
                    variable.setValue(false);
                }
            });

Similar Threads

  1. Replies: 0
    Last Post: 27 Oct 2009, 5:11 PM
  2. Replies: 1
    Last Post: 15 Apr 2009, 6:11 AM
  3. How to group diferent positioned radios in a radiogroup.
    By zharack in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 23 Mar 2009, 2:22 AM
  4. Lines between grid columns
    By JNason in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 18 Apr 2008, 10:07 AM

Thread Participants: 2