Page 346
Table 14.2Continued
Property Name | Description |
Use 3D Controls | Causes the form to display items with a 3-dimensional,beveled look. Setting the value to true will cause any canvas with a visual attribute name set to default to be displayed with background color gray. It will also cause the bevel for each item to be lowered. |
Use File | Specifies the location of the .MMX runfile when you attach a custom menu to a form module. |
Validation Unit | This property determines the amount of data that may be entered before Forms performs validation. The default is item. This means Forms will validate after the operator navigates from an item. |
Vert. MDI Toolbar | The name of the vertical toolbar displayed with the form. |
Selecting the Coordinate Information property on the Form property sheet causes a button to appear at the top of the property sheet. Clicking this button causes the Coordinate Info dialog box to appear, as shown in Figure 14.11. This dialog box controls the unit of measure used for height, width, and object placement.
FIG. 14.11
The Coordinate Info
dialog box displaying
default settings.
The developer has the choice between two coordinate systems: real and character. Real is the default and uses pixels, centimeters, inches, and points as units of measure. Character uses each character as a single unit of measure.
In a Character Cell coordinate system the layout is subdivided vertically and horizontally into character cells. The actual size and position of objects depends on the size of a default character on the particular platform. When you use this type of system you cannot edit the Character Cell Width/Height values. Character systems can produce unexpected results in the layout editor, particularly when using the mouse to position items. This type of system produces a "snap-to-grid" effect. The item will always move to the nearest grid increment because each character or object on the form must fit within the predefined cell.
Page 347
NOTE |
I recommend that you use the default coordinate settings. They allow you to drag and drop items precisely. |
The Current Record Attribute form property is an extremely important property to use when the form is displaying multi-record tabular style records. The reason is the user does not know which record is the active block record on the tabular block when the cursor is located in another block. Normally, the user knows the active record by the blink of the cursor. When the cursor is outside the block, there isn't a blinking cursor within the block to show the user the active record. This is even more crucial when a tabular block is a master block to a multi-record tabular detail block. How does the user know which master record the detail records are related to?
Figure 14.12 uses form module CURATT.FMB located on the CD. The figure contains two multi-record tabular style blocks. The master block at the top displays the various Department records. As the user navigates from one department record to the next, the employees on the bottom block change. In the figure, the cursor is missing from the bottom block. Any user viewing this application would be hard pressed determining which person and department to look for.
FIG. 14.12
A multi-record tabular
style form that does not
use the current record
attribute.
To solve this problem, the form was modified. A visual attribute was created and the Current Record Attribute form property was populated with the visual attribute. The visual attribute has a background color of red and a foreground color of white. This setting will cause the current record for any block to be red with white text. The noncurrent records will be white with black text. As Figure 14.13 shows, it is much easier to identify the person and the person's department by using the Current Record Attribute property with a visual attribute.
Page 348
FIG. 14.13
A multi-record tabular
style form using the
current record attribute.
NOTE |
You can see the effects of a visual attribute by running the CURATT.FMB form located on the CD. Load the form into Forms Designer. Press the Run button to generate and run the file. To delete the visual attribute, open the form property sheet and blank out the visual attribute property value. Run the form to see the effect. |
Defining a visual attribute is a simple procedure. Select the Visual Attributes object on the Object Navigator, click the create button and Forms will create a new visual attribute. Click the button to the left of the visual attribute name. This will open a property sheet similar to the one displayed in Figure 14.14. The visual attribute has a number of display properties, which will supersede any object's properties when the visual attribute is used with that object.
FIG. 14.14
The visual attribute
property sheet used in
the CURATT.FMB form.
Page 349
TIP |
Defining and using visual attributes will save a great deal of time when formatting items. Placing one visual attribute into the object is easier than setting each individual setting. It also gives consistency to the form. I try to use the visual attributes on most objects I create. |
Forms are comprised of one or more blocks. The Form properties apply to all blocks and items on the form because a block is a child object of the form. A block has properties that control attributes only on the specified block. Each block on a form has its own set of properties. These properties control important form attributes such as navigation. Table 14.3 describes block properties.
Table 14.3 Block Properties
Property Name | Description |
Base Table | The name of the table or view that supplies the records to the block. |
Block Description | The block label that will appear in the menu. |
Class | The name of the property class that supplies the values to various block properties. |
Column Security | Determines whether Forms should enforce column-by-column security. If an operator does not have privileges on a particular column, Forms will make the corresponding item non- updateable for the particular operator by dynamically changing the Update Allowed item property to false. |
Comment | An area on the property sheet used to record comments. |
Current Record Attribute | This property contains the name of a visual attribute.The normal record attributes will be superseded by the values of the visual attribute named in this property when a record is current. |
Delete Allowed | Determines whether the block will allow records to be deleted. The values are true or false. |
Direction | Specifies the layout direction for bidirectional objects. |
In Menu | Determines whether the block should be listed in the block menu. |
Insert Allowed | Determines whether the block will allow records to be inserted. The values are true or false. |
Key Mode | Determines how Forms identifies rows in a database.This property is included for applications using non-Oracle |
continues