1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    54
    Vote Rating
    0
    DarekKay is on a distinguished road

      0  

    Default Unanswered: Scrollbar overlapping the content

    Unanswered: Scrollbar overlapping the content


    I'm not sure, if that's a bug, or if I'm just missing something.

    I have a VerticalLayoutContainer with some widgets. Since sometimes there is not enough space to show all widgets, I added a AutoY-ScrollSupport to that container:

    Code:
        public void onModuleLoad(){
            VerticalLayoutContainer con = new VerticalLayoutContainer();
    
            TextButton textButton =
                    new TextButton("QQQWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWQQQ");
    
            ContentPanel dummyPanel = new ContentPanel();
            dummyPanel.setHeight(400);
    
            ScrollSupport scroll = new DefaultScrollSupport(con.getElement());
            scroll.setScrollMode(ScrollMode.AUTOY);
    
            con.add(textButton, new VerticalLayoutData(1, -1));
            con.add(dummyPanel, new VerticalLayoutData(1, -1));
    
            Viewport vp = new Viewport();
            vp.add(con);
            RootLayoutPanel.get().add(vp);
        }
    When the browser window is too small to display the button and the dummy container, the scroll bar is visible. The only problem is: that scrollbar is overlapping the actual content:

    Before:
    scroll_before.jpg

    After (reduce the window height to make the scrollbar visible):
    scroll_after.jpg

    The button illustrates the problem, since it wasn't resized but overlapped.

    Thanks in advance!

  2. #2
    Sencha User
    Join Date
    Oct 2011
    Posts
    54
    Vote Rating
    0
    DarekKay is on a distinguished road

      0  

    Default


    Same behaviour in Beta 4

  3. #3
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,753
    Vote Rating
    113
    Answers
    60
    sven is just really nice sven is just really nice sven is just really nice sven is just really nice sven is just really nice

      0  

    Default


    Sorry to say that, but one part of the issue is on your code:

    Code:
      con.setAdjustForScroll(true);
    Button does not fully respect the width too, i opened a ticket for this.

  4. #4
    Sencha User
    Join Date
    Oct 2011
    Posts
    54
    Vote Rating
    0
    DarekKay is on a distinguished road

      0  

    Default


    Quote Originally Posted by sven View Post
    Sorry to say that, but one part of the issue is on your code:
    Code:
      con.setAdjustForScroll(true);
    Thanks, it's working! This seems to just leave some space for the scrollbar. Is a standard behaviour possible? Normally the content is getting resized when a scrollbard is added/removed (e.g. in any browser). I'm not sure whether you can achieve this for a single panel. But at least it doesn't overlap anymore.

    Quote Originally Posted by sven View Post
    Button does not fully respect the width too, i opened a ticket for this.
    Yes, I noticed that after the upgrade, too. It seems as if only Button widgets wouldn't be able to set the correct width. This worked till beta3.