Page 285
The Navigator menu is displayed when the Object Navigator is the current screen. This menu is seldom used. Figure 12.24 shows the options on this menu.
The Ownership View and Visual View optionsThe first two options on the Navigator menu control how the objects are arranged in the Object Navigator. Ownership View is the default. In this arrangement, all the form objects are displayed and the items are listed according to the hierarchy.
A form contains blocks and blocks contain items. When you select an object, you can see the child objects by expanding the object. This is the default view and is recommended.
Pressing the adjacent radio button enables the Visual View. This view changes the arrangement of the objects in the Object Navigator. In this view, only windows, canvases, and items are displayed.
This corresponds to the hierarchy of items in a window. In this view, canvases are assigned to windows and items are assigned to canvases. Figure 12.25 shows the Employee form in the Visual View.
Page 286
FIG. 12.24
The Navigator menu
options.
NOTE |
You can try this yourself by loading the EMPLOYEE.FMB file located on the CD into the Object Navigator. Select the File|Open menu option to launch the Open dialog box. Locate and select the EMPLOYEE.FMB file on the CD. Press the OK button. You should the various components of the file displayed in the Object Navigator. |
FIG. 12.25
The Employee form in
the Visual View.
Page 287
The Create, Delete, and Compile Selection optionsThe Create option is the same as the green plus sign button on the Tool Palette. This option creates a new object like the item currently selected in the Object Navigator.
The Delete option is the same as the red "X" button on the tool palette. This option deletes the selected object. The Compile Selection option compiles any object that's currently selected.
NOTE |
After you use Forms Designer for a while, you'll find that there are a number of different ways to do the same thing. For instance, you can delete an item using the delete option on the menu, using the delete option on the tool palette, pressing the delete key on the keyboard, using the cut option, or using the clear option. |
The Expand, Collapse, Expand All, and Collapse All optionsThe next part of the Navigator pull-down menu offers options to expand, collapse, expand all, or collapse all objects. These options are identical to the icons on the tool palette.
The Mark, Goto Mark, and Synchronize optionsThe Mark option is used to label a spot in the Object Navigator for quick return using the Goto Mark option. This is a useful way to return to an object when the form contains a large number of objects.
The Synchronize option turns the procedure that maintains synchronization between the Object Navigator and the Layout Editor on and off. When this option is turned on, an object that is selected in the Object Navigator is also selected in the Layout Editor.
The default is turned on, indicated by check mark to the left of the option.
The Only Objects with PL/SQL optionThe Only Objects with PL/SQL options eliminates any object from the Object Navigator that does not contain PL/SQL code. This is handy when you're searching a form for PL/SQL scripts.
The default for this option is turned off. The option is turned on when there's a check mark to the left of the option. Figure 12.26 shows the Object Navigator when this option is turned on.
FIG. 12.26
The Object Navigator
when the Only Objects
with PL/SQL option
is turned on.
Page 288
Now that you've seen the components of the Object Navigator, you can create a form file and a default block. When you've done this, you'll have a fully functional form that you can use to add records to the database, retrieve records based on search criteria, change records, delete records, and save the changes in the database.
The next section gives you a list of steps to create the form. After that is a section that shows you how a form is created.
The following steps show you how to create a simple one-block form. These steps are handy for creating any new form blocks.
Select the block object on the form.
Press the Create (green plus sign) button on the Object Navigator tool palette.
Update the values on the General tab sheet of the New Block Option dialog. Enter the name of a table or view in the Base Table field. Change the values of the other fields as needed.
Press the Items tab. Press the Select Columns button to populate the Items window. Deselect items as desired. Items that are highlighted or have an "X" in the Include checkbox are selected. Change the item labels as needed.
Press the Layout tab. Populate the fields on this dialog as needed. Click OK.
The following sections contain the settings used to create the first part of a form used in the next several chapters. You may use the settings contained in the figures to create your own form. The finished form will be similar to form EMPCH13.FMB that will be used in Chapter 13 to practice techniques.