Announcement

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

    Scroll To Top

    Can we have 'Scroll To Top' feature in smartGWT?

    #2
    There is a SmartGWT API scrollToTop(), which scrolls to the top. Is that what you’re looking for?

    Comment


      #3
      On which component it can be applied? I mean to say can i use it on click of a button and call Window.scrollTo(0,0) method in the handler?

      Comment


        #4
        scrollToTop() is a method available on any Canvas (see docs).

        We don't recommend doing whole-page scrolling in enterprise applications. It's generally just not a good UE, as essentially all enterprise apps have certain controls that you want to keep on screen. Scrolling in sub-regions of the page makes much more sense.

        If you insist on using full-page scrolling, then we recommend using a SmartClient component as the top-level container, so that you have SmartClient-managed scrolling instead of browser-managed scrolling. Browser-managed scrolling is full of bugs, such as, ending up with scrollbars on both axes when content shrinks, because some browsers fail to realize that the horizontal scrollbar is necessary only because there's a vertical scrollbar, but content would fit if both were removed.

        Finally, if you ignore even those best practices, here's how you can scroll the browser window in GWT.

        Comment

        Working...
        X