You must create a form before attaching any windows to it. If you haven’t created any forms, refer to Forms for more information about doing so.
To create a window, open the form definition the window will be attached to. Be sure the Windows tab is displayed. Click New; the Toolbox and Layout windows will appear.
If the Properties window isn’t already displayed, choose Properties from the Layout menu. Select the arrow tool from the Toolbox and click in the layout window outside of the window’s area to select the window. The resize handles that appear on the window’s perimeter indicate it is selected. Use the Object tab’s Name property to set the window’s name. This name will be used in scripts, so you may want to substitute underscores for spaces in the name.
Use caution when changing the name of a window. If the window name has already been used in scripts, the scripts won’t compile properly until the window name is changed in the scripts as well. |
Use the Title property to enter the name that will be displayed in the window’s title bar at runtime. This name can have spaces and can be changed at any time because it isn’t used in scripts.
Use the WindowType property to select the window type. Several types of windows are available: primary, modal dialog, modeless dialog, lookup, wizard, palette and toolbar. The following four are the most common window types:
Use the Properties window to specify other characteristics of the window, such as the background color and whether it will have resize controls. Refer to the Window properties for a complete list of window properties.
Use the AutoLinkTable window property to specify a table to link to the window. An auto-link table should be specified if you want users of your application to be able to add fields from the auto-linked table using the Modifier. The best table to auto-link to a window is the source or destination of most of the information displayed in the window.
To design the window, complete the following tasks.
Size the window Drag the resize handles around the perimeter of the window to set its size. The window will be this size when it’s first opened in the application.
Position the fields in the window Drag global and local fields to the layout area from the Toolbox. Be sure to include all necessary fields, such as push buttons. You can use the drop-down list in the Toolbox to select one of the tables attached to the form. This narrows the list of global fields to those from a particular table, making it easier to find a specific field.
Add any graphics or prompts These include pictures, lines, boxes, prompts or text that help describe the purpose of the window.
Specify field and drawn object properties Use the Properties window to specify characteristics of the window fields and drawn objects. Refer to the Field properties and Drawn object properties for a complete list of properties.
Set the tab sequence Choose Set Tab Sequence from the Layout menu. Double-click the field you want to be first in the tab sequence, and then press the tab key. Double-click the field you want to be second in the sequence. Continue this procedure until the sequence is in the desired order, and then choose Set Tab Sequence from the Layout menu again.
Link fields to their associated prompt Choose Link Prompt from the Tools menu. Select each field and drag the mouse pointer to its prompt (the text describing the field). A flashing black line will indicate that the link was made. The link is used to indicate required and disabled fields. When a field is required or disabled, its prompt shows the status of the field. Typically, the linked text is shown in bold for required fields and light gray for disabled fields. Linking a field to a prompt is shown in the following illustration.
When you’ve finished, be sure to choose Link Prompt again to turn prompt linking off.
Position the window To set the position in which the window will appear when opened, choose Position Window from the Layout menu. A window the size of the window you’re designing will appear. Move this window to the position where you want the window you’re designing to appear. The actual size and position of the window are displayed in the window. When the window is positioned correctly, click OK.
At any time you can choose Preview from the Layout menu to display a preview of the window. The preview shows only the visual characteristics of the window and will not be functional.
When you’ve finished designing the window, close the layout window and click Save to save the new window. Click OK in the Form Definition window to save the form the window is part of.
Windows are saved only when the layout window is closed. Save your work often by closing the layout window and then reopening it to continue designing the window. Be sure the window and form have been saved before attaching any scripts. |