Views in painters that edit objects

Each painter has a View menu that you use for opening views. The views you can open depend 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. See “Using views in painters”.

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 shared by the Window, Visual User Object, and Application painters, but the Design, Column Specifications, Data, Preview, Export/Import Template for XML, and Export Template for XHTML 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.

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.

The sample is labeled Layout and has tabs for Invoice Entry and Customer Entry. The Invoice Entry tab page is displayed and shows portions on the application title, Power Hardware, the slogan Best hardware anywhere, and text boxes for Invoice Number, Customer Number, Item Number, Quantity, and Each Price.

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.

The sample shows the General tab of the Properties view, with sample text in fields for Name, Picture Name, URL, and Tag. At bottom are check boxes for Visible and  Enabled, which are both selected, Focus Rectangle, Original Size, which is also selected, and  Invert and Border. At bottom is a drop down list box labeled Border Style with the entry Style Box ! displayed.

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 events and functions, define and modify user events and functions, declare variables and external functions, and view the scripts for ancestor objects.

The sample shows the Script view. Selected at top are w _ my app _ frame and open ( ) returns long. 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 7, “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.

The sample is labeled Control List. At left is a Control column showing a list of controls and their icons, such a radio button icon with the control name r b _ 3, and an OK button icon with the name c B _ 3. At right is a list of the Ancestors for the controls, such as radio button and command button.

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.

The sample, labeled Event List, shows a long list of default and user-defined events. The visible part of the first entry reads clicked ( unsigned long flags, integer x pos, integer y pos ) returns long [ p b m _ l button. An icon of a page full of text next to this entry shows that it has a script.

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.

The sample is labeled 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 and script of its own.

The sample Function List displays a long list of  system defined functions such as arrange sheets ( arrang types t ) returns integer and object level functions such as my func ( integer arg 1 ) returns integer, which has an icon to its left that is gray above and white below.

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.

The sample is labeled Structure List and 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.

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.