Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext User bigmountainben's Avatar
    Join Date
    Apr 2009
    Posts
    46
    Vote Rating
    0
    bigmountainben is on a distinguished road

      0  

    Default 2.0-m1 modifying label style on a combobox field messes up the empty field warning

    2.0-m1 modifying label style on a combobox field messes up the empty field warning


    GWT 1.6, GXT 2.0-m1 (built as of 5/10/09), Hosted mode

    When you have a ComboBox field, and:
    - you style the label with a margin component
    - you set allowBlank to false

    The warning image will not appear in the right place (on top of the combo box arrow).

    By contrast applying the same formatting to a TextField works fine.

    The example code is below- just tab through the two fields, without any input to demonstrate.

    public class Test implements EntryPoint {

    public void onModuleLoad() {

    Window w = new Window();
    w.setHeading("my favorite variables");
    w.setWidth(500);
    w.setAutoHeight(true);
    w.setShadow(true);
    w.add(new TestForm(w));
    w.show();
    }

    static class TestForm extends LayoutContainer {

    Window w;

    TestForm(Window w) {
    this.w = w;
    FormLayout fl = new FormLayout();
    fl.setDefaultWidth(300);
    fl.setLabelWidth(100);
    setLayout(fl);
    setAutoHeight(true);
    }

    @Override
    protected void onRender(Element parent, int index) {
    super.onRender(parent, index);
    // Some fields
    TextField foo = new TextField();
    foo.setFieldLabel("foo");
    foo.setAllowBlank(false);
    foo.setLabelStyle("font-size:16px;margin-right:1em");

    SimpleComboBox bar = new SimpleComboBox();
    bar.setFieldLabel("bar");
    bar.setLabelStyle("font-size:16px;margin-right:1em");
    bar.add("Foo");
    bar.add("Bar");
    bar.add("Baz");
    bar.add("Quux");
    bar.setAllowBlank(false);

    add(foo);
    add(bar);
    }
    }

  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


    Your post is missing significant details again. In which browser do you ahve the issues?

  3. #3
    Ext User bigmountainben's Avatar
    Join Date
    Apr 2009
    Posts
    46
    Vote Rating
    0
    bigmountainben is on a distinguished road

      0  

    Default


    Read the first line.

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


    Hostedmode can be safari, IE or firefox

  5. #5
    Ext User bigmountainben's Avatar
    Join Date
    Apr 2009
    Posts
    46
    Vote Rating
    0
    bigmountainben is on a distinguished road

      0  

    Default


    Safari (MacOS X 10.5.6)

  6. #6
    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


    The erroraligning is bound to a bug in the aligning method for browsers using the webkit engine. This will be fixed with the next milestone.

  7. #7
    Ext User bigmountainben's Avatar
    Join Date
    Apr 2009
    Posts
    46
    Vote Rating
    0
    bigmountainben is on a distinguished road

      0  

    Default


    Thanks Sven!

  8. #8
    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


    You should also not use margin-right there. Browsers display margin differently. You can defnie the labelWidth with setLabelWidth

Thread Participants: 1