Partly scrolling popup window?

I’m newbie with Vaadin and I have Swing background. I’ve banged my head against the wall when trying to implement this very simple dialog. I cannot figure out how I can make only part of my popup window auto-scrollable.

I have a very simple popup window with close-button on bottom right corner and it should be always visible. Rest of the window space is reserved for panel (using GridLayout) which can have content so that it doesn’t fit into the window and scrolling is needed. With what kind of size settings I can accomplish that? I think I’ve tried pretty much every size setting on that panel and layout and set the panel scrollable but I cannot get the popup working in desired way.

I’m using Vaadin version 6.5.4

Hi,

Are you using:
yourPanel.setContent(yourGridLayout)
OR
yourPanel.addComponent(yourGridLayout).

For Layout, I think, you want to use setContent(x).

Cheers,

I’m using contentPanel.setContent(gridLayout) by giving gridLayout as parameter for Panel constructor. I actually noticed that constructor Panel(ComponentContainer) also sets width to 100% which is exactly what I want. I’m not defining height for the contentPanel but this doesn’t help vertical scrollbar to appear :frowning:

You need to specify some explicit height for the Panel in order for it to show scrollbars. An undefined high Panel will just grow with its content and never show a vertical scrollbar.

The explicit height doesn’t help either. Should the layout inside my scrollable panel have explicit height also? My component hierarchy is following (hope that is interpretable):

-Window (explicit height and width)
—VerticalLayout (size full)
------(Content)Panel (explicit height and width, scrollable)
This panel should have vertical scroll when needed

---------GridLayout(explicit height and width)
Size full or undefined doesn’t help

------(CloseButton)Panel (explicit height and width, not scrollable)
---------HorizontalLayout

I think I’ve tried all variations with these size settings :frowning:

The layout inside the Panel (GridLayout in your case) needs to be undefined height (or larger than the Panel) in order for the Panel to show scrollbars). Giving layout a size makes the layout clip all overflowing content. So if you have 100% sized layout inside the Panel, it will never have scrollbars.

Aaah, ok that makes sense. Actually I tried using panel’s default VerticalLayout and everything worked like I wanted but I’ll try those size settings you mentioned for GridLayout, cheers!

Hi,
I’ve a similiar problem:

Vaadin 6.8.8
-Window (explicit width, modal, center, resizable) (
should be
not
scrollable
)
—VerticalLayout (size full) (
should be
not
scrollable
)
------GridLayout (
should be
not
scrollable
)
------Panel (
should be scrollable
)

But the hole PopupWindow has a scrollbar.

I’ve no idea anymore, therefore I’m hoping to get help here.