ScrollPanel and DisclosurePanel

116 views
Skip to first unread message

tong123123

unread,
Apr 24, 2012, 6:19:06 AM4/24/12
to google-we...@googlegroups.com
I have a DockLayoutPanel, inside the DockLayoutPanel there is some FlowPanel plus many DisclosurePanel, I want the content inside the DockLayoutPanel can scroll when many of these DisclosurePanel are expanded, how to achieve this?
and I found that if I set DockLayoutPanel height to 100%, the DockLayoutPanel cannot show anything, it must use a numeric unit like setHeight("720px"); why?

Jens

unread,
Apr 24, 2012, 7:01:03 AM4/24/12
to google-we...@googlegroups.com
I have a DockLayoutPanel, inside the DockLayoutPanel there is some FlowPanel plus many DisclosurePanel, I want the content inside the DockLayoutPanel can scroll when many of these DisclosurePanel are expanded, how to achieve this?

Use a ScrollPanel inside the DockLayoutPanel and put your FlowPanel into that ScrollPanel...
 
and I found that if I set DockLayoutPanel height to 100%, the DockLayoutPanel cannot show anything, it must use a numeric unit like setHeight("720px"); why?

Have you put your DockLayoutPanel inside the RootLayoutPanel or in any other LayoutPanel? If you do so, you won't need to specify any heights as they always fill the available area by default.

Setting the height to 100% only works if the parent element has a size (and thats maybe not given in your structure) whereas setting the height as fixed pixels works without this requirement.

-- J.

tong123123

unread,
Apr 24, 2012, 11:25:32 AM4/24/12
to google-we...@googlegroups.com
is SimplePanel a kind of LayoutPanel?

Jens

unread,
Apr 24, 2012, 12:09:38 PM4/24/12
to google-we...@googlegroups.com
No, but SimpleLayoutPanel is.

-- J.
Reply all
Reply to author
Forward
0 new messages