Threaded View

  1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    3
    Vote Rating
    1
    imjakes is on a distinguished road

      0  

    Default Combobox not alligned in IE?

    Combobox not alligned in IE?


    Hi,

    When i use a combobox then it looks like the indput box and the select button of the combobox is not alligned?
    (see attached screenshot)

    It looks fine in Firefox and Crome.

    My example is a copy paste of the sencha examples for forms (only the top form) but in the example site it looks fine.
    Here is the code:
    Code:
    public class TestWindow extends Window {
        TestPanel tp;
        public TestWindow() {
            setAutoHeight(true);
            setWidth(400);
            tp = new TestPanel();
            add(tp);
        }
    }
    Code:
    public class TestPanel extends LayoutContainer {
    
    
        private VerticalPanel vp;
        private FormData formData;
        private ListStore<ComboboxItem> _comboBoxStore = new ListStore<ComboboxItem>();;
    
    
        @Override
        protected void onRender(Element parent, int index) {
            super.onRender(parent, index);
            formData = new FormData("-20");
            vp = new VerticalPanel();
            vp.setSpacing(10);
            createForm1();
            add(vp);
        }
    
    
        private void createForm1() {
            FormPanel simple = new FormPanel();
            simple.setHeading("Simple Form");
            simple.setFrame(true);
            simple.setWidth(350);
    
    
            TextField<String> firstName = new TextField<String>();
            firstName.setFieldLabel("Name");
            firstName.setAllowBlank(false);
            firstName.getFocusSupport().setPreviousId(simple.getButtonBar().getId());
            simple.add(firstName, formData);
    
    
            TextField<String> email = new TextField<String>();
            email.setFieldLabel("Email");
            email.setAllowBlank(false);
            simple.add(email, formData);
    
    
            _comboBoxStore.add(new ComboboxItem("niras"));
            ComboBox<ComboboxItem> combo = new ComboBox<ComboboxItem>();
            combo.setFieldLabel("Company");
            combo.setDisplayField("name");
            combo.setTriggerAction(TriggerAction.ALL);
            combo.setStore(_comboBoxStore);
            simple.add(combo, formData);
    
    
            DateField date = new DateField();
            date.setFieldLabel("Birthday");
            simple.add(date, formData);
    
    
            TimeField time = new TimeField();
            time.setFieldLabel("Time");
            simple.add(time, formData);
    
    
            Slider slider = new Slider();
            slider.setMinValue(40);
            slider.setMaxValue(90);
            slider.setValue(60);
            slider.setIncrement(1);
            slider.setMessage("{0} inches tall");
    
    
            final SliderField sf = new SliderField(slider);
            sf.setFieldLabel("Size");
            simple.add(sf, formData);
            CheckBox check1 = new CheckBox();
            check1.setBoxLabel("Classical");
    
    
            CheckBox check2 = new CheckBox();
            check2.setBoxLabel("Rock");
            check2.setValue(true);
    
    
            CheckBox check3 = new CheckBox();
            check3.setBoxLabel("Blue");
    
    
            CheckBoxGroup checkGroup = new CheckBoxGroup();
            checkGroup.setFieldLabel("Music");
            checkGroup.add(check1);
            checkGroup.add(check2);
            checkGroup.add(check3);
            simple.add(checkGroup, formData);
    
    
            Radio radio = new Radio();
            radio.setBoxLabel("Red");
            radio.setValue(true);
    
    
            Radio radio2 = new Radio();
            radio2.setBoxLabel("Blue");
    
    
            RadioGroup radioGroup = new RadioGroup();
            radioGroup.setFieldLabel("Favorite Color");
            radioGroup.add(radio);
            radioGroup.add(radio2);
            simple.add(radioGroup, formData);
    
    
            Radio radio3 = new Radio();
            radio3.setBoxLabel("Apple");
            radio3.setValue(true);
    
    
            Radio radio4 = new Radio();
            radio4.setBoxLabel("Banana");
    
    
            RadioGroup radioGroup2 = new RadioGroup();
            radioGroup2.setFieldLabel("Favorite Fruit");
            radioGroup2.add(radio3);
            radioGroup2.add(radio4);
            simple.add(radioGroup2, formData);
    
    
            TextArea description = new TextArea();
            description.setPreventScrollbars(true);
            description.setFieldLabel("Description");
            simple.add(description, formData);
    
    
            Button b = new Button("Submit");
            simple.addButton(b);
            simple.addButton(new Button("Cancel"));
    
    
            simple.setButtonAlign(HorizontalAlignment.CENTER);
    
    
            FormButtonBinding binding = new FormButtonBinding(simple);
            binding.addButton(b);
    
    
            SpinnerField spinnerField = new SpinnerField();
            spinnerField.setIncrement(.1d);
            spinnerField.getPropertyEditor().setType(Double.class);
            spinnerField.getPropertyEditor().setFormat(NumberFormat.getFormat("00.0"));
            spinnerField.setFieldLabel("Duration (s)");
            spinnerField.setMinValue(-10d);
            spinnerField.setMaxValue(10d);
            simple.add(spinnerField, formData);
    
    
            vp.add(simple);
        }
    
    
        @SuppressWarnings("serial")
        private class ComboboxItem extends BaseModelData {
    
    
            public ComboboxItem(String text) {
                setText(text);
            }
    
    
            public String getText() {
                return get("text");
            }
    
    
            public void setText(String text) {
                set("text", text);
            }
        }
    }
    Any idea to what is wrong?

    Regards,
    Jacob
    Attached Images

Thread Participants: 1