Stacked canvases are displayed in a window along with the window's
content canvas(es) and any number of other stacked canvases. You can set the
bevel, color, and pattern attributes of a stacked canvas to make it look
different than the underlying content canvas. Contrarily, you can make the
stacked canvas look like the content canvas, and then show and hide the stacked
canvas pro-grammatically so end users are unaware that a separate canvas is
being displayed.
This technique can be used to make items or boilerplate appear to
change dynamically. When navigating from a content canvas item to a stacked
canvas item, you can only see the stacked canvas, since the content canvas
disappears.
Creating a stacked canvas is similar to creating a content canvas. To
define a stacked canvas, you need to set certain canvas properties that apply
only to stacked canvases, and create items and boilerplate text and graphics as
you would for a content canvas.
Note: To convert an existing content canvas to a stacked canvas, simply
change its Canvas Type property from Content to Stacked.
At runtime, stacked canvases are displayed automatically in response to
navigation in the same manner as content canvases. To show and hide stacked
canvases programmatically, use the SHOW_VIEW, HIDE_VIEW, and SET_VIEW_PROPERTY
built-ins.
Uses for Stacked Canvases
You can use stacked canvases to do the following:
·
Display items or boilerplate graphics that end
users need to see only in certain situations. (Define a stacked canvas that
displays help text or images that remain hidden until they are explicitly
invoked by the end user.)
·
Display headers that display constant
information such as company names, Dates, and status information. (Define a
stacked canvas that always appears in front of the current content canvas. When
the current content canvas is replaced by another, the stacked canvas remains
visible in the window. Use this technique to avoid duplicating interface
elements on multiple content canvases in the same window.)
·
Create a block with items that scroll
dynamically in the window where they are displayed, much like a spreadsheet.
(If a block contains more items than fit in a window, Oracle Forms
automatically scrolls the window as the end user tabs to items outside the
window's frame. This can cause important fields—such as primary key values—to
be scrolled out of the window and thus out of the end user's view. For example,
for a block that displays information about orders, the Order ID always should
be visible, regardless of navigation by the end user. By placing the Order ID
item on the underlying content canvas, and placing items that can be scrolled
out of sight on a stacked canvas, the stacked canvas becomes the scrolling
region, rather than the window itself. Note that stacked canvases can have
their own scroll bars, independent of the window's scroll bars.)