Announcement

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

    Resizing fonts/controls causes scrollbar to be displayed.

    Isomorphic,

    I have a form with a TextAreaItem that expands to fill the height of the form. This works as expected when using the default font/control size, however, increasing the font/control size causes a scrollbar to be displayed.

    Click image for larger version

Name:	scrollbar.JPG
Views:	69
Size:	12.4 KB
ID:	265541

    The follow entry point can be used to reproduce the issue.


    Code:
    @Override
    public void onModuleLoad() {
        Canvas.resizeFonts(2);
        Canvas.resizeControls(2);
    
        HLayout mainLayout = new HLayout();
        mainLayout.setWidth("50%");
        mainLayout.setHeight("50%");
    
        VLayout detailsLayout = new VLayout();
    
        CheckboxItem item1 = new CheckboxItem("Item1");
        item1.setLabelAsTitle(true);
    
        SelectItem item2 = new SelectItem("Item2");
    
        TextAreaItem item3 = new TextAreaItem("Item3");
        item3.setWidth("*");
        item3.setHeight("*");
    
        DynamicForm form = new DynamicForm();
        form.setNumCols(1);
        form.setHeight("*");
        form.setPadding(2);
        form.setCellPadding(3);
        form.setTitleOrientation(TitleOrientation.TOP);
        form.setItems(item1, item2, item3);
    
        VLayout formLayout = new VLayout();
        formLayout.setPadding(3);
        formLayout.setMembersMargin(15);
        formLayout.setCanHover(Boolean.FALSE);
    
        formLayout.addMember(form);
    
        TabSet tabSet = new TabSet();
        tabSet.setPaneMargin(3);
        Tab tab1 = new Tab("Tab1");
        tab1.setPane(formLayout);
        tabSet.addTab(tab1);
        detailsLayout.addMember(tabSet);
    
        mainLayout.addMember(detailsLayout);
        mainLayout.show();
    }
    SmartClient Version: v12.1p_2020-09-29/Pro Deployment (built 2020-09-29)

    Thanks

    #2
    Hi Isomorphic,

    Have you had a chance to review this?

    Thanks

    Comment


      #3
      Sorry for the delay, we have been able to reproduce the problem and we're looking at the best way to solve it.

      Comment


        #4
        We've made a change to address this.

        Please retest with a build dated June 12 or later.

        Comment


          #5
          A quick update on this report - the change we applied on June 11 addresses this issue in 13.0, but doesn't fully work on 12.1.

          We're revisiting the problem today and will update here shortly.

          Comment


            #6
            It took some time to get back to this, but changes have been made and you should find things working as you expect as of today's 12.1/13.0 builds, dated June 21 or later.

            Comment


              #7
              Hi Isomorphic,

              Thanks for the fix; it resolved the issue with the scrollbar.

              There is a spacing issue when specifying titles for some items on the form which can be reproduced with the following test code.

              Code:
              @Override
              public void onModuleLoad() {
                  Canvas.resizeFonts(2);
                  Canvas.resizeControls(2);
              
                  HLayout mainLayout = new HLayout();
                  mainLayout.setWidth("50%");
                  mainLayout.setHeight("50%");
              
                  VLayout detailsLayout = new VLayout();
              
                  CheckboxItem item1 = new CheckboxItem("item1", "Item 1");
                  item1.setLabelAsTitle(Boolean.TRUE);
              
                  SelectItem item2 = new SelectItem("item2", "Item 2");
              
                  TextAreaItem item3 = new TextAreaItem("item3", "Item 3");
                  item3.setWidth("*");
                  item3.setHeight("*");
              
                  DynamicForm form = new DynamicForm();
                  form.setNumCols(1);
                  form.setHeight("*");
                  form.setPadding(2);
                  form.setCellPadding(3);
                  form.setTitleOrientation(TitleOrientation.TOP);
                  form.setItems(item1, item2, item3);
              
                  VLayout formLayout = new VLayout();
                  formLayout.setPadding(3);
                  formLayout.setMembersMargin(15);
                  formLayout.setCanHover(Boolean.FALSE);
              
                  formLayout.addMember(form);
              
                  TabSet tabSet = new TabSet();
                  tabSet.setPaneMargin(3);
                  Tab tab1 = new Tab("Tab1");
                  tab1.setPane(formLayout);
                  tabSet.addTab(tab1);
                  detailsLayout.addMember(tabSet);
              
                  mainLayout.addMember(detailsLayout);
                  mainLayout.show();
              }
              The form will now look like below with extra space below Item 1 and Item 3.

              Click image for larger version  Name:	form_spacing.JPG Views:	0 Size:	15.2 KB ID:	265991

              Thanks!
              Last edited by stonebranch3; 20 Jul 2021, 12:24.

              Comment


                #8
                Thanks for the report - this one's been fixed for tomorrow's builds, dated July 23 and later.

                If you're interested, the problem was that we weren't propagating wrapTitle/wrapItemTitles to the element we use to measure and reserve space for the title-height with top-orientation - so, in this case, it wrapped at the space and reserved space for two lines, but correctly only output one.
                Last edited by Isomorphic; 22 Jul 2021, 04:11.

                Comment


                  #9
                  Hi Isomorphic,

                  I'm using the July 24 build and I noticed that a CheckboxItem still has extra space when using longer titles.

                  For example,

                  Code:
                  CheckboxItem item1 = new CheckboxItem("item1", "This is the title for Item 1");
                  item1.setLabelAsTitle(Boolean.TRUE);
                  It seems to be related to the width of the CheckboxItem since explicitly setting the width can resolve it, however, I didn't expect the width to matter when using the label as title option.

                  Thanks

                  Comment

                  Working...
                  X