Page 402
Property | Setting |
Canvas-view type | stacked |
Bevel | none |
Background | cyan |
Stacked View Width | 592 |
Stacked View Height | 210 |
Display Y Position | 90 |
The next step is to place the image item and the block-three items used for the Glasses records on the new canvases.
Figure 15.22 displays canvas2 after the changes have been made.
The reformatted canvas is shown in Figure 23.
A form displays a canvas when the input focus moves into an item contained on
the canvas. This can occur by tabbing from one item to another or by navigating to
another
Page 403
block. The Employee Update form uses buttons and the go_block subprogram to display the various canvases. The go_block subprogram is placed in a When-button-pressed trigger linked to a button. When the button is clicked, Forms Runtime navigates to the block specified in the subprogram and displays the canvas for the first item on the block. Figure 15.24 shows the trigger that calls canvas2 or the Glasses records.
FIG. 15.22
Canvas2 after the
block-three items have
been formatted.
FIG. 15.23
The reformatted
canvas1 displaying 10
Tools records.
The default canvas in the Employee Update form is canvas1, containing the Tools record. The Glasses records are displayed by clicking the Glasses button. This causes
Page 404
FIG. 15.24
The PL/SQL script for
the Glasses button that
causes the display of
the canvas containing
the Glasses records.
FIG. 15.25
The Employee Update
for after he Glasses
button is clicked.
Page 405
FIG. 15.26
The Employee Photo
button trigger script that
displays canvas3.
I find this technique very useful and preferable over scroll bars and small text. The users of the application seem to really appreciate the ease of obtaining different views of data.
NOTE |
Form module EMPCH15B.FMB, on the CD, contains the final application with the additional canvases.n |
A property class is a set of properties that can pass its property values to other objects. Each object that has been reviewed in this part of the book contains a property class property. When this property is populated with the name of a property class, the values of the property class override those contained in the object. A property class is similar to a visual attribute in that it can supply property values to an object. It differs in that the visual attribute has a set number of properties. These properties only pertain to formatting attributes. A property class can have as few or as many properties as needed, and they can consist of properties other than formatting properties.
The next several subsections discuss some special tools that exist on the property sheet form. Several of these tools are used to create and modify a property class.
Page 406
The property sheet dialog box contains eight icon buttons on a tool bar at the top-left of the box. From left to right, the buttons are as follows (see Figure 15.27):
FIG. 15.27
The Property Sheet
toolbar.
Button | Description |
Copy property | The tool on the far left, which copies an object's properties into the property clipboard. |
Paste property | The properties in the clipboard can be transferred into the current object by clicking the tool. It is the second tool from the left. |
Add property | Adds properties to a property class. |
Delete property | The fourth button is the tool. It deletes properties from the property class. |
Property class | The fifth button (with the white figure) is the tool. Clicking this button causes Designer to create a new property class. The new class contains the same properties as the original property sheet. |
Inherit | The sixth button (with the red figure) is the tool. Clicking this button causes the properties on the property sheet to return to their original default value. |
Intersection/Union | The tool with the intersection symbol is the tool, which changes the list of properties displayed in a multi-object property list. This button can be toggled, causing the property sheet to display either an intersection list or a union list. The intersection list displays the properties common to all of the |