Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: GXT 3.0 - Scrollbars for containers (panels)

  1. #1
    Sencha User
    Join Date
    Jul 2011
    Posts
    45
    Vote Rating
    0
      0  

    Default GXT 3.0 - Scrollbars for containers (panels)

    Hello all!

    I was wondering how can one get scrollbars for containers in GXT 3.0? E.g. I have VerticalLayoutContainer in a FramedPanel. Many Fields are added to VerticalLayoutContainer so that last ones are hidden because they all do not fit in. How can I add scroll bars for FramedPanel (or any other panel) ?

  2. #2
    Ext GWT Premium Member
    Join Date
    Aug 2010
    Location
    Germany, Solingen
    Posts
    274
    Vote Rating
    3
      0  

    Default

    Just a thought ... have you tried to add a ScrollPanel? Don't know if this works, but I would give that a try.

  3. #3
    Sencha User
    Join Date
    Jul 2011
    Posts
    45
    Vote Rating
    0
      0  

    Default

    Thank you for answer, didn't know there is such a widget, but it's GWT widget though. In my personal experience most of the GWT widgets are not straight forward with GXT. And so is ScrollPanel. Maybe it's working if used correct way but simply adding it and setting size does not.

  4. #4
    Ext GWT Premium Member
    Join Date
    Jan 2009
    Location
    Franktown, CO
    Posts
    440
    Vote Rating
    6
      0  

    Default

    I too can't get scroll bars to work with 3.0.0, if you figure it out let me know.

  5. #5
    Sencha User
    Join Date
    Jul 2011
    Posts
    45
    Vote Rating
    0
      0  

    Default

    I figured it out. The answer was in front of my eyes all the time:

    http://staging.sencha.com:8080/examples-dev/#ExamplePlace:buttons

    I
    used FlowLayoutContainer.
    Code:
    FlowLayoutContainer container = new FlowLayoutContainer();
    // add your content
    container.getScrollSupport().setScrollMode(ScrollMode.AUTO);

  6. #6
    Sencha User
    Join Date
    Jul 2011
    Posts
    45
    Vote Rating
    0
      0  

    Default

    All of these classes should do it as they all implement HasScrollSupport interface

    CssFloatLayoutContainer
    FlowLayoutContainer
    HorizontalLayoutContainer
    PortalLayoutContainer
    VerticalLayoutContainer

  7. #7
    Ext GWT Premium Member
    Join Date
    Jan 2009
    Location
    Franktown, CO
    Posts
    440
    Vote Rating
    6
      0  

    Default

    I had tried using VerticalLayoutContainer but with that class the call to getScrollSupport() returns null so that doesn't work and I wasn't sure how to create/set the ScrollSupport, however your example of using FlowLayoutContainer does work. I see that internally that container does this:

    Code:
    public ScrollSupport getScrollSupport() {
        if (scrollSupport == null) {
          scrollSupport = new DefaultScrollSupport(getContainerTarget());
        }
        return scrollSupport;
      }
    I'm not sure why VerticalLayoutContainer and perhaps the others don't. I'll see if I can use FlowLayoutContainer or add the above code when using VerticalLayoutContainer . Thanks!

  8. #8
    Sencha User
    Join Date
    Nov 2011
    Posts
    23
    Vote Rating
    0
      0  

    Default

    I have the same problem with VerticalLayoutContainer. BorderLayoutContainer or ContentPanel work good in plan of scrolls. But I need V.L.C.

  9. #9
    Ext GWT Premium Member
    Join Date
    Jan 2009
    Location
    Franktown, CO
    Posts
    440
    Vote Rating
    6
      0  

    Default

    I think you will have to extend VLC because getContainerTarget() is protected.

  10. #10
    Sencha User
    Join Date
    Jul 2011
    Posts
    45
    Vote Rating
    0
      0  

    Default

    Yeah, I noticed it as well. V.L.C and H.L.C returns null, so I asked sencha

    http://www.sencha.com/forum/showthre...ot-implemented

    if that is lack of implementation and will be implemented later or if we have to make our own implementation.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •