This may or may not be the answer you are looking for... but is the content
of your panel laid out using constraints or absolute values? If you do it
with constraints, then your content should get resized when the scrollbar
appears. Then again, this may be the inverse of what you are trying to do,
and it may cause labels or text to get truncated.

Is there a reason that you cannot make the panel wide enough to accomodate
your content and scroll bar both, then if the scroll bar doesn't show up
then it will just be a little more padding to the right.
It seems like if you were to resize the panel dynamically with a scroll
event then it might "jump around" which may not be the desired effect.

If you can post code I'd be happy to take a look, I've done a lot of
tweaking layouts with lots of scrollbars lately!

HTH
Rachel

On 2/1/07, nwebb <[EMAIL PROTECTED]> wrote:

Hi,

I'm sure this is excruciatingly simple but i couldn't find an answer (I
must be searching with the wrong keywords).

I have a Panel.
Inside it is a Text component, and a Repeater underneath that
(...repeating a CheckBox) .
All works fine.

I want to set the "maxHeight" of the Panel to 200px, so that if I get too
many Checkboxes appearing, my content will scroll vertically.

When I set maxHeight, I get *both* horizontal and vertical scrollbars
appearing - the horizontal scrollbar only appears because the width of the
vertical scrollbar eats in to the Panel width - therefore I get horizontal
scrolling of about 16 pixels.

If I set horizontalScrollbarPolicy to false then my content is still
clipped.
I'm sure I can muster a workaround easily enough (e.g. manually resize
Panel based on ScrollEvent etc), but I thought there surely must be
something in-built and neater, already in place to deal with this kind of
scenario?

Any help much appreciated.


Reply via email to