Announcement

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

    SGWT.mobile - SelectItem some questions/comments

    Hi,

    1)
    SelectItem PickList uses 22px font-size which is big in some cases (especially when showing multiple fields).
    How can I alter the style in a proper way. By proper I mean not by using CellFormatter to encapsulate the text within a <span> because this leads to add a lot of content to the picklist html and ends up in slowing down the scroll a lot.

    2)
    DateSelect with style D-M-Y does not look great since 2013-01-01 (columns are all the same size while more room was given to M column and less to D before)

    3)
    Would be nice to have the field value auto-selected when the picklist pops-up. Currently it opens with the first item, not the item related to the field value.

    4)
    How can I set a momentum so the picklist?

    5)
    Style of the html table should be adapted to handle too long strings in the picklist (using block-nowrap-ellipsis...)
    When showing multiple columns (with PickListField) if the first column contains overflowing content, the second column is just not visible. Better behavior would be that the content of the first column is "ellipsed".

    6)
    Already posted, empty value should be added to the valueMap if field is not required.

    Thanks and best wishes, Ben

    #2
    Thanks for solving 6).

    Any plan concerning 1) to 5) ?

    Thanks, Ben.

    Comment


      #3
      5 has been fixed.

      There is now a ListGridField.setWidth() that can be used via setPickListFields as well.

      Still working on some of these others - what do you mean by 4)?

      Comment


        #4
        2) has now been fixed such that month gets the largest share regardless of MDY or DMY order.

        Comment


          #5
          3) is now fixed as well.

          Comment


            #6
            Thanks for all the enhancements!

            About 4: I mean scrolling inertia on the "slot machine" list. Currently there is no inertia at all which makes the scrolling of long list very painful.
            Last edited by bda@n-side.com; 13 Jan 2013, 05:37.

            Comment


              #7
              Finally for 1, we've added some styling APIs that can be used via setPickListFields(): ListGrid.baseStyle, ListGrid.recordBaseStyleProperty, the ListGrid.getBaseStyle(Record, int, int) override point, and SelectItem.pickListBaseStyle.

              In addition, there is ListGridField.baseStyle which is used on the Widgets -> Forms -> Pickers sample for the "Favorite Animal" form item to style the "scientific name" PickList field.

              About 4 - we see what you mean and we'll note down the need for momentum scrolling here.

              Comment


                #8
                Many thanks for 1). This works very well and does not impact scrolling performance.

                There is just one thing that I cannot make work, the column widths. In the "Animal" example setWidth is used to set a specific width to the column.
                I am trying to use the same to control widths of the multiple columns. I have an example with 2 columns and I would like to allocate more room to the first column. Whatever I try, the columns are sized evenly (50-50). I have tried:

                col1.setWidth("*") col2.setWidth("50")
                col1.setWidth("80%") col2.setWidth("20%")
                col1.setWidth("*") col2.setWidth("20%")

                Thanks for your help, Ben.

                Comment


                  #9
                  Well, actually sometimes it works, sometimes it doesn't ... With more investigations I figured out that with setRequired(false) it does not work. I assume this is coming from the fact that an empty row is added on the top of the list in that case and this empty row contains only one column and breaks the other (multi-columns) rows layout.
                  Maybe the empty row should be made of as many TD as required to keep the table consistency.

                  Ben.

                  Comment


                    #10
                    We've fixed the issue with the empty row interfering with layout. Let us know if there's still issues sizing the columns.

                    Note that, unlike SGWT desktop, the widths are not completely enforced as pixel-perfect widths - the numbers you provide are just handed to an HTML table.

                    Comment


                      #11
                      Works good now, thanks!

                      Comment

                      Working...
                      X