oracle 如何在 APEX 中更改区域的高度
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11841468/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to change height of Region in APEX
提问by Blob
I'm trying to change the height of a Region however the height which i enter seems to add height to the region.
我正在尝试更改区域的高度,但是我输入的高度似乎为该区域增加了高度。
To test, i changed the width of the Region which successfully increased the width of the Region. So i dont understand why 'height' doesnt seem to work.
为了测试,我改变了区域的宽度,成功地增加了区域的宽度。所以我不明白为什么“高度”似乎不起作用。
As you can see from the screen print, the region increases in width but if i increase the height, it adds it below the region's border (which is the aqua color).
正如您从丝网印刷中看到的,该区域的宽度增加,但如果我增加高度,它会将其添加到该区域的边界(浅绿色)下方。
This is entered into Region Attributes row in its properties:
这在其属性中输入到区域属性行中:
STYLE="height:1000px; width:1000px; background-color:aqua;"
Am i going wrong somewhere when trying to change the height?
尝试更改高度时我会出错吗?
回答by thommo_nz
I'm working with Apex 4.2.5.00.08 and this is how I resolved this issue.
我正在使用 Apex 4.2.5.00.08,这就是我解决此问题的方法。
Background: I was working on a 'single page' view of the information in my application, using different panes to list various collections of information. Each pane was a Classic Report (with hyperlinks to the individual details) as you cannot have more than one Interactive Report on a page.
背景:我正在处理我的应用程序中信息的“单页”视图,使用不同的窗格来列出各种信息集合。每个窗格都是一个经典报告(带有指向各个详细信息的超链接),因为一个页面上不能有多个交互式报告。
My problem was that some collections had more data than others, resulting in my panes being different sizes. I was able to control the width of the panes by setting each Region Attributes to style="width:410px;"
(based on my screen resolution less a few pixels divided by the number of regions across the page - in this case 3).
我的问题是某些集合的数据比其他集合多,导致我的窗格大小不同。我能够通过将每个区域属性设置为style="width:410px;"
(基于我的屏幕分辨率减去几个像素除以整个页面的区域数量 - 在这种情况下为 3)来控制窗格的宽度。
The height was a different matter. The pane height was always adjusted to match the quantity of information in each collection.
高度是另一回事。总是调整窗格高度以匹配每个集合中的信息量。
Solution: In the Header and Footer - Region Header I placed the following:
解决方案:在页眉和页脚 - 区域页眉中,我放置了以下内容:
<div style="overflow: auto; min-height: 250px; max-height: 250px;">
and in the Region Footer I placed:
在我放置的区域页脚中:
</div>
I suppose you could have different values for min-height
and max-height
so that a pane/region could adjust within a range. My objective was to ensure they were consistently the same size.
我想您可以为min-height
and设置不同的值,max-height
以便窗格/区域可以在一个范围内进行调整。我的目标是确保它们的大小始终相同。
What happens when the information in the collection is greater than the displayable pane size is that a scroll bar is displayed on the right hand side of the pane, making it possible for users to scroll down that collective list.
当集合中的信息大于可显示窗格大小时,会在窗格的右侧显示滚动条,使用户可以向下滚动该集合列表。
What that means for layout is that your panes remain a fixed size. Where there is a lack of information in the collection, there is some blank space within the region. When you allow Apex to do the sizing for you, there is still the blank space as per the form's background.
这对布局意味着您的窗格保持固定大小。馆藏信息不足的地方,区域内就会有一些空白。当您允许 Apex 为您调整大小时,根据表单的背景仍然存在空白空间。
回答by Anand
just add this line in your region header
只需在您的区域标题中添加这一行
<div style="overflow: auto; min-height: 250px; max-height: 250px;">
<div style="overflow: auto; min-height: 250px; max-height: 250px;">