Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Dynamic form size and FormItems with setHeight("*")

    Hi, I'm trying to make dynamic form behaviour similar to sample:
    http://www.smartclient.com/smartgwt/showcase/#layout_form_spanning
    and found very annoying bug there.
    1) Open this sample and try to resize the form by dragging right border. When mouse up first time, the size of dynamic form increases by 7 px.
    2) Open sources for this sample, you'll see "form.setHeight(180)", but if you measure it with rule, it is about 200px
    3) Finally, I've prepared example where dynamic form is created with title and without one. The example with title changes dynamic form height even if I particularly set it. Please help.
    Code:
        public void onModuleLoad() {
            HLayout main = new HLayout();
            main.addMember(create(""));
            main.addMember(create("Title"));
            main.draw();
        }
    
        private DynamicForm create(String title) {
            DynamicForm form = new DynamicForm();
            form.setIsGroup(true);
            form.setGroupTitle(title);
            TextItem text = new TextItem("Text");
            text.setHeight("*");
            form.setFields(text);
            form.setWidth(200);
            form.setHeight(200);
            return form;
        }

    #2
    1) not reproducible in Firefox or IE. ALWAYS post browser versions
    2 & 3) the form has overflow:"visible" by default, see the docs, the height is a minimum in this mode.

    Comment


      #3
      1) Firefox 3.5.4; Chromium 4.0.226.0; IE 6.0.
      Again, how to reproduce: Open or Refresh example (it reproduces only once after load), then change width of DynamicForm by dragging right border. In the end of dragging, the height increases for 7 px as well.
      2) The source shows that text area inside the form must FIT (*) remaining space. But it doesn't FIT, it EXPANDS form. Overflow is not an issue, as it must not happen.
      3) My example shows that two equal forms with different titles has different height. But the hight is set and text item within the form must FIT, not OVERFLOW.

      Anyway, setting setOverflow() doesn't solve the problem in all the cases.
      Please, comment.

      PS. From now, the form in the showcase grows vertically every time you drag its right border. So, I'm sure you'll easily reproduce the bug.
      Last edited by ruk; 4 Nov 2009, 01:07.

      Comment


        #4
        Smart guys, You could at least confirm you read it. I do not claim it is critical and I do no need this fix at all, but I spent an hour testing, making example and describing the bug. Thank you in advance.

        Comment


          #5
          It doesn't happen with the corresponding SmartClient sample. It's likely to be something different in the CSS which you may be able to find with Firebug - this one won't be looked at for a while by us.

          Comment

          Working...
          X