Results 1 to 2 of 2

Thread: [FNR] CheckBox input / boxlabel alignment incorrect

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext GWT Premium Member
    Join Date
    Oct 2008
    Vote Rating

    Default [FNR] CheckBox input / boxlabel alignment incorrect

    We were seeing very strange alignment issues with checkboxes in our application after migrating from GXT 2.0 to GXT 2.1.1.

    In CheckBox.onResize(int,int), alignElements() is only called if boxLabel is null. I'm not sure what the reasoning is for this, but if I override onResize and always force it to alignElements(), the issues go away.

    Simple runnable example:
    public class MyApp implements EntryPoint {
        public void onModuleLoad() {
            CheckBox c1 = new CheckBox();
            c1.setBoxLabel("Misaligned GXT checkbox");
            c1.setStyleAttribute("backgroundColor", "#ffffaa");
            CheckBox c2 = new CheckBox() {
                protected void onResize(int width, int height) {
                    super.onResize(width, height);
            c2.setBoxLabel("Fixed GXT checkbox");
            c2.setStyleAttribute("backgroundColor", "#ffaaff");
            LayoutContainer p = new LayoutContainer(new RowLayout());
            p.add(c1, new RowData(1, 80));
            p.add(c2, new RowData(1, 80));
    You can see in the attached image that the checkbox is only properly aligned after the layout manager is executed for the "fixed" checkbox. The CheckBox.alignElements states that the input and label should be aligned to the vertical center of the element.

    In our app, the behavior is even stranger. The label for the input is ~30px higher and ~20px further right than it should be. If I force alignElements() onResize(), it works perfectly fine.
    Attached Images Attached Images

  2. #2
    Sencha Premium Member
    Join Date
    Sep 2007
    Vote Rating


    This is fixed in SVN now as of revision 1951

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts