Horizontal scrolling fro DockLayoutPanel?

69 views
Skip to first unread message

membersound

unread,
Jan 15, 2013, 5:36:30 PM1/15/13
to google-we...@googlegroups.com
Hi,

how can I get scolling in a website that is composide by an outer enclosing DockLayoutPanel?
My page consists of the DockLayoutPanel having north, south, east, west, center.

Now if I shrink the window everything is shrunk accordingly. Which is quite nice if working with PCT.

BUT if the page is bigger than the screen size by default, I would love to see scrollbar on the right.
I tried wrapping the DockLayoutPanel into a ScrollPanel, which results just in an empty page.

How can I get horizontal scrolling?

Jens

unread,
Jan 15, 2013, 7:11:22 PM1/15/13
to google-we...@googlegroups.com
A LayoutPanel inside a ScrollPanel does not work and really does not make that much sense. The parent of a LayoutPanel needs a size otherwise LayoutPanel does not work. On the other hand a ScrollPanel has an inner scrollable element that can not have any specific size as it must adapt to its child size. Otherwise ScrollPanel can not show  scroll bars.

Normally you would have ScrollPanels inside center and maybe inside east/west. DockLayoutPanel should be used to layout the very basic areas of a web application and a web application typically has fixed header/footer/sidebars and a scrollable center area. You dont want to scroll the entire web application, only its content.

If you need a more website like layout with vertical/horizontal scrollbars that scroll the whole website you better not use LayoutPanels.

-- J.

membersound

unread,
Jan 16, 2013, 2:22:37 AM1/16/13
to google-we...@googlegroups.com
Ok thanks for your opinion!

I played around with this a bit, and probably you're right that best approach is to have fixed header/footer and a scrollable content area in my case.
Reply all
Reply to author
Forward
0 new messages