You could add a right padding to your controls to cause them to stay
away from the scrollbars, remember that scrollbars aren't taken into
account during controls layout.
El 04/05/2009, a las 9:42, JoshBeall <firstname.lastname@example.org> escribió:
I've got the following page setup, with constraints that causes
everything (datagrid, content grid, etc.) to grow and shrink when
the user adjusts the size of the window.
Now, the problem is, if there are enough controls on the page to
require vertical scrolling (e.g., if I resize the window, or change
to another state that has more controls on the page), and it adds
vertical scroll bars, the controls are not reduce in size, which
means that some of them are now underneath the vertical scrollbar,
which causes a horizontal scrollbar to appear. Like this:
Right now the constraint on all the controls is right="10", and
what I want is for it to be 10 pixels from the right of the usable
canvas--so if a scrollbar appears, it should be 10 pixels from the
left edge of the scrollbar. If there is no scrollbar, it should be
10 pixels from the edge of the viewport.
This is the way the browser treats scrollbars. How do I get this
behavior in Flex?
Yes, I know that--I was wondering if there was a way to get the constraints to observe the presence (or absence) of scrollbars, or if we just have to do as you mentioned, and add enough padding that the scrollbars will be in an area with whitespace. In other words, we have to always reserve space for the scrollbars, even when they aren't necessary, instead of letting Flex dynamically resize the items on the canvas based on the constraints we've given (which, I thought, was the whole point of using constraints).
Michael Borbor, on May 4, 2009 7:48 AM
You could add a right padding to your controls to cause them to stay away from the scrollbars, remember that scrollbars aren't taken into account during controls layout.