Views in painters that edit objects

Each painter has a View menu that you use for opening views. Which views you can open depends on the painter you are working in. Every painter has a default arrangement of views. You can rearrange these views, choose to show or hide views, and save arrangements that suit your working style.

For more information about arranging views, see Chapter 2, “Customizing PocketBuilder.”

Many views are shared by some painters, but some views are specific to a single painter. For example, the Layout, Properties, and Control List views are used by the Window, Visual User Object, and Application painters, but the Design, Column Specifications, Data, and Preview views are specific to the DataWindow painter. The WYSIWYG Menu and Tree Menu views are specific to the Menu painter.

The following sections describe the views you see in many painters. Views that are specific to a single object type are described in the chapter for that object type.

Layout view

The Layout view shows a representation of the object and its controls. It is where you place controls on an object and design the layout and appearance of the object. Figure 3-1 displays an example.

Figure 3-1: Example of a window in Layout view

The sample is a window titled Layout and has tabs for Logon, Tests, and Results. The Logon tab page is displayed and shows a database configuration drop-down list, check boxes for Windows C E and Create Tables, a drop-down list for the D B M S, a text box for the D B parameters, as well as text boxes for Build and Engineering version. The text boxes and drop-down lists are all empty in the sample displayed.

If the Properties view is displayed and you select a control in the Layout view or the Control List view, the properties for that control display in the Properties view. If you select several controls in the Layout view or the Control List view, the properties common to the selected controls display in the Properties view.

Properties view

The Properties view displays properties for the object itself or for the currently selected controls or nonvisual objects in the object. You can see and change the values of properties in this view. Figure 3-2 shows the Properties view for a button control.

Figure 3-2: Properties view for a button control

The sample shows the General tab of the Properties view of a button control, with sample text in fields for Name, Text, and Tag. At bottom are check boxes for Visible and  Enabled, which are both selected. Check boxes for Default and Cancel are not selected.

The Properties view dynamically changes when you change selected objects or controls in the Layout, Control List, and Non-Visual Object List views.

If you select several controls in the Layout view or the Control List view, the Properties view says “group selected” in the title bar and displays the properties common to the selected controls.

In the Properties view pop-up menu, you can select Labels On Top or Labels On Left to specify where the labels for the properties display. For help on properties, select Help from the pop-up menu.

If the Properties view is displayed and you select a nonvisual object in the Non-Visual Object List view, the properties for that nonvisual object display in the Properties view. If you select several nonvisual objects in the Non-Visual Object List view, the properties common to the selected nonvisual objects display in the Properties view.

Script view

The Script view is where you edit the scripts for system events and functions, define and modify user events and functions, declare variables and external functions, and view the scripts for ancestor objects.

Figure 3-3: Script view for a window Open event

The sample shows the Script view. The window control, w underscore edit underscore frame, is selected in the first drop-down list and the Open event is selected in the second drop-down list. The third drop-down list is blank and grayed. Below this is the script for the selected event.

You can open the default script for an object or control by double-clicking it in the System Tree or the Layout, Control List, or Non-Visual Object List views, and you can insert the name of an object, control, property, or function in a script by dragging it from the System Tree.

For information about the Script view, see Chapter 6, “Writing Scripts.”

Control List view

The Control List view lists the visual controls on the object. You can click the Control column to sort the controls by control name or by hierarchy.

Figure 3-4: Control List view for a window

Shown is the Control List, which has a Control column showing a list of controls and their icons, and  a second column containing a list of the Ancestors for the controls.

If you select one or more controls in the Control List view, the controls are also selected in the Layout view. Selecting a control changes the Properties view, and double-clicking a control changes the Script view.

Event List view

The Event List view displays the full event prototype of both the default and user-defined events mapped to an object. Icons identify whether an event has a script, is a descendent event with a script, or is a descendent event with an ancestor script and a script of its own.

Figure 3-5: Event List view for a window

Shown is the Event List, which contains a list of default and user-defined events. The first list entry is for the  clicked event. An icon of a page full of text to the left of this entry shows that it has a script. Other events in the list do not have scripts, and therefore have no icon associated with them.

Non-Visual Object List view

The Non-Visual Object List view is a list of nonvisual objects that have been inserted in an Application object, window, or user object of any type. You can sort controls by control name or ancestor.

Figure 3-6: Non-Visual Object List view

Shown is the Non-Visual Object List. At left is a Control column listing sample objects such as data store _ 1 and transaction _ 1. At right is a column that shows the ancestor for each control, such as data store and transaction.

Function List view

The Function List view lists the system-defined functions and the object-level functions you defined for the object. Icons identify whether a function has a script, is a descendant of a function with a script, or is a descendant of a function with an ancestor script as well as a script of its own.

Figure 3-7: Function List view

Shown is the Function List view, which displays a list of  system defined functions such as arrange sheets and user functions such as my func, with the full syntax for each function. The my func function has an icon to its left, indicating that it has a script associated with it.

Note that although the half-colored icon identifies the myfunc user-defined function as having both an ancestor script and a script of its own, for a function this means that the function is overridden. This is different from the meaning of a half-colored icon in the Event List view.

Structure List view

The Structure List view lists the object-level structures defined for the object.

Figure 3-8: Structure List view

Shown is the Structure List which displays a list of structures such as struc 1 and struc 2. Each has an icon at left that identifies it as a structure.

If you double-click a structure in the Structure List view, the structure’s definition displays in the Structure view.

Structure view

The Structure view is where you edit the definition of object-level structures in the Window, Menu, and User Object painters.

Figure 3-9: Structure view

The sample has a text field at top labeled Structure Name:, a column below at right for listing Variable Names, and a column at left with drop down boxes for selecting the type for each variable.