1. #1
    Sencha User
    Join Date
    Feb 2009
    Posts
    107
    Vote Rating
    0
    marman is on a distinguished road

      0  

    Default Need Help Figuring Out How to make Form like this...

    Need Help Figuring Out How to make Form like this...


    I am trying to implement a form per the attached Mock up. I am stumbling on the "Custom Range" radio option which needs to include two DateField Objects. Does anyone have any ideas they can offer as to how to make this work?
    Attached Images

  2. #2
    Software Architect
    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


    Code:
        FormData f = new FormData("100%");
        FormPanel p = new FormPanel();
        p.setWidth(350);
        p.setLayout(new RowLayout(Orientation.VERTICAL));
    
        LayoutContainer top = new LayoutContainer();
        FormLayout formLayout1 = new FormLayout();
        top.setLayout(formLayout1);
    
        TextField<String> t1 = new TextField<String>();
        t1.setFieldLabel("Label 1");
        top.add(t1, f);
    
        RadioGroup g = new RadioGroup();
        g.setOrientation(Orientation.VERTICAL);
        g.setFieldLabel("Label 2");
        g.add(new Radio());
        g.add(new Radio());
        g.add(new Radio());
    
        top.add(g, f);
    
        p.add(top, new RowData(1, -1));
    
        LayoutContainer bottom = new LayoutContainer();
        FormLayout formLayout2 = new FormLayout();
        formLayout2.setLabelAlign(LabelAlign.RIGHT);
        bottom.setLayout(formLayout2);
        p.add(bottom, new RowData(1, -1, new Margins(0, 0, 0, 80)));
    
        DateField d = new DateField();
        d.setFieldLabel("label 3");
        bottom.add(d, f);
        d = new DateField();
        d.setFieldLabel("label 4");
        bottom.add(d, f);
    You can do it like this for example. However i would do a custom "date range" fieldwidget.

  3. #3
    Sencha User
    Join Date
    Feb 2009
    Posts
    107
    Vote Rating
    0
    marman is on a distinguished road

      0  

    Default


    This is exactly what I was after. So this is what you mean by "doing your own layout". Now i get it! thanks a million!

  4. #4
    Software Architect
    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


    No that i did not meant with "doing your own layout".

    But for this you dont need an own layout. This would be a formlayout with two widgets. First widget would be the combobox and the second widget would be some custom date range widget

Thread Participants: 1