Announcement

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

    SGWT- DateItem TextField to Picker gap

    SGWT Power 3.1p 2013-02-23

    In DateITem, Picker icon does not stick to TextField anymore. There is a white space gap between the two. This is very annoying in multi-row multi-column forms since it breaks vertical alignment of items.

    This is a simple code that already shows the problem.
    Code:
    		DynamicForm form = new DynamicForm();
    		
    		form.setColWidths("100","300","100","300");
    		form.setNumCols(4);
    
    		TextItem textItem1 = new TextItem("Text1");
    		TextItem textItem2 = new TextItem("Text2");
    		TextItem textItem3 = new TextItem("Text3");
    		DateItem dateItem = new DateItem("date");
    		dateItem.setUseTextField(true);
    		form.setItems(textItem1,textItem2,dateItem,textItem3);
    		form.draw();
    Thanks, Ben.
    Attached Files

    #2
    What browser, skin and DOCTYPE is this from?

    Comment


      #3
      Browser: tested with Firefox, Chrome, Safari on OSX, all have this problem (the figure was captured on safari)
      Skin (default one, have not changed that)
      DOCTYPE :

      in .html bootstrap
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

      in .gwt.xml
      <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">

      Comment


        #4
        Any feedback on this please, I am waiting on this before deploying my app.


        Thanks, Ben

        Comment


          #5
          Tested again in SGWTPower 4.0 (2013-03-01), still the same problem (all browsers). It seems to come when the date item width is less than 180. Here are two code samples, one that shows the problem, dateitem is sized to 150px width (see fig150), the second does not show the problem, dateitem is sized to 200px width (see fig200).

          Code:
          		DynamicForm form = new DynamicForm();
          		
          		form.setColWidths("100","150");
          		form.setNumCols(2);
                  form.setFixedColWidths(true);
          
          		TextItem textItem1 = new TextItem("Text1");
          		textItem1.setWidth("100%");
          
          		DateItem dateItem = new DateItem("date");
          		dateItem.setWidth("100%");
          		dateItem.setUseTextField(true);
          
          		form.setItems(textItem1,dateItem);
          		form.draw();
          Code:
          		DynamicForm form = new DynamicForm();
          		
          		form.setColWidths("100","200");
          		form.setNumCols(2);
                  form.setFixedColWidths(true);
          
          		TextItem textItem1 = new TextItem("Text1");
          		textItem1.setWidth("100%");
          
          		DateItem dateItem = new DateItem("date");
          		dateItem.setWidth("100%");
          		dateItem.setUseTextField(true);
          
          		form.setItems(textItem1,dateItem);
          		form.draw();
          I hope with this additional info you will now take my problem into consideration. My workaround at the moment is to size all dateitems more than 180px but this is not nice because in most cases this is more than needed when gives less space for other items in multi-column forms.

          Thanks, Ben.
          Attached Files
          Last edited by bda@n-side.com; 2 Mar 2013, 01:59.

          Comment


            #6
            Looks like the DateItem was sized as if "3 select boxes" editor was used, not considering setUseTextField(true)

            My 2cts.

            Comment


              #7
              It looks like there was a regression here. We've made a change to address this. Please try the next nightly build and let us know if you continue to see the bug

              Regards
              Isomorphic Software

              Comment


                #8
                Problem solved, many thanks!

                Comment

                Working...
                X