ApEx: Using Scrollbars in a Region
If you’ve got a report with a lot of rows to display you’ve standardly got a couple of options:
2) Show all the rows and let the user scroll down the page.
Here’s a third option: Get the region which contains the report itself to scroll. You can see a demo here:
This is achieved by setting the Region Header to:
<div style="overflow: auto; height: 450px;">
And the Region footer to:
Just change the value of 450px as desired and that’s it.
Note: One problem with this is that if the rows of your report don’t fill the full 450 pixels then you end up with white space at the end of the report. You can use
max-height instead of
height to get round this problem. Unfortunately, however, max-height does not seem to work with Internet Explorer (6.0 or 7.0) but does work with Firefox. Since the production environments where Firefox can be guaranteed to be the sole browser used are few and far between, the upshot is that we are generally forced to use
height as opposed to
Acknowledgments: Thanks to Brian Barenbaum for coming up with the idea of using “max-height” instead of just “height” in the DIV’s style tag (See comment 5 of this blog entry).