Announcement

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

    setShowSortArrow(SortArrow.FIELD) and corner style

    SmartClient Version: v9.1p_2014-06-04/Pro Deployment (built 2014-06-04)

    I am hiding the corner sorter by setting setShowSortArrow(SortArrow.FIELD), however, I was hoping this would remove the sorter image, but leave the other visual appearances alone, specifically, leave the empty section above the scrollbar grey rather than make it an empty white section.

    Is there an option for controlling this?

    Thanks

    #2
    Once you've removed the sorter, you are looking at backgroundColor of the ListGrid as a whole in the space where it was (easily determined with the Watch Tab by the way), so you could set that to grey, and it shouldn't affect other styling since that's the only position it which it shows through.

    Comment


      #3
      Thanks for the Watch Tab reminder.

      Speaking of the Watch Tab, if you click the Inspect button from that Watch Tab and look at the List Grid that has a single Name column, that List Grid has the exact behaviour I am looking for.

      I experimented with setting the backgroundColor, however, when the columns do not expand the entire width of List Grid, that background colour is visible in the entire unused header space, which I want to avoid. In the Watch Tab example I mention above, the corner sort is disabled, yet the little header section remains.

      Comment


        #4
        You are probably looking for listGrid.leaveScrollbarGap:false.

        Comment


          #5
          I tried setting setLeaveScrollbarGap(Boolean.FALSE), and there is indeed no gap when no scrollbar exists, however, when the scrollbar does exist, the white gap is still there (right above the scrollbar, and right next to the last column header).

          In that Watch Tab example, when the scrollbar is visible, the space above it still appears like a column header, but without the sorter icon. It looks nice and consistent.

          I am thinking it has to be something else.

          Thanks

          Comment


            #6
            Nevermind, my bad, once you click on Name to sort by Name, the corner sorter icon appears and then it becomes functional. So it is not actually disabled. :(

            Comment


              #7
              So just to reiterate: leaveScrollbarGap will get rid of the space where the sorter appears when there's no scrollbar. You can use this in tandem with suppressing the sorter, and just set the ListGrid's background color to grey (or whatever color you want) if you don't want a white space there.

              Or just leave the sorter there.. it's not clear why you'd try to get rid of it when the scrollbar is present.

              Comment


                #8
                Unfortunately, setting the background color doesn't just impact the tiny space above the scrollbar (if it exists). When the column headers do not span the entire grid, that entire empty header space becomes the background color.

                I was only wanting the little gap at the far right to maintain the header look and feel but without exposing the corner sorter functionality for this particular grid via the setShowSortArrow(SortArrow.FIELD) option.

                I have left the corner sorter for now.

                Comment


                  #9
                  We're still unclear on what the problem with the sorter button could possibly be (again, when the scrollbar is showing), but note that it is an AutoChild, so you can just style it if you want it to look different, and install event handlers if you want different behavior.

                  Comment


                    #10
                    Was just trying to keep user intervention on this particular grid to a minimum, and changing the sort at the field level (with the default sort being ASCENDING) was sufficient here. There was an enum SortArrow.FIELD to control this, so I was experimenting with it.
                    I have left it, and I am using event handlers to control behaviour.
                    Thanks

                    Comment

                    Working...
                    X