Progress
AppBuilder
Developer’s Guide


Configuring SmartWindow Visual Properties

Configuring the visual properties for your new SmartWindow can be simple or complex, depending on how well the default settings suit your purpose.

Whenever you create a SmartWindows object using AppBuilder, you actually create two visible elements: a Window and a Frame. The Frame completely covers the client area of the Window, and resizes itself when you resize the Window. Because of that, it may not be at all obvious to you at first that you are dealing with two different elements or how to open the Properties dialog box for the underlying Window rather than for the Frame that covers it.

Both the Window and Frame elements have properties you may wish to set. This section describes the properties that apply to the Window part. See the "Configuring SmartFrame Visual Properties" section in this chapter for a discussion of properties unique to Frames.

Opening the Property Sheet for the Underlying Window

Perhaps the most common way to open the property sheet for any object is to double-click on its client area, if you have your preferences so set. But the overlying Frame will prevent you from doing that here: double-clicking will open the property sheet for the Frame, not the Window. To open the Properties dialog box for the Window part of the SmartWindow object, use one of these methods:

CAUTION: You should not leave bare Window surface exposed unnecessarily, since there is a slight possibility that you might then unintentionally place an object partly outside the Frame, causing it to disappear.

To expose some of the underlying Window, follow these two steps:

  1. Select the Frame part of the SmartWindow by clicking in the client area (the area below the title bar). A border with handles will appear, as shown in this figure:
  2. Drag the bottom-center handle upward a bit. This exposes the surface of the underlying Window widget, though there might be little or no visible difference.

Once you have the Window selected, opening the property sheet will cause the dialog box shown in Figure 3–1 to appear.

Figure 3–1: Window Property Sheet

Minimal Configuration Changes

Although you can choose to accept many default settings, you should at least ensure that each SmartWindow you create is uniquely identifiable. To individualize a SmartWindow, make these changes:

Miscellaneous Properties (Other Settings)

There are a number of changes to a Window’s appearance or behavior that you can make, if the default settings do not suit your purposes. They are listed here:

Menus

Unlike SmartDialogs and SmartFrames, a SmartWindow can have a Menu Bar and pull-down menus. It can also have a pop-up menu. You create both types of menu using the same editor and the same procedure.

NOTE: You cannot use this menu if you plan to place a SmartToolbar, even if you only intend to use the toolbar element of that object. The built-in menu and the SmartToolbar are incompatible. See the description of the SmartToolbar object in the Progress ADM 2 Guide .

To create a Menu Bar and pull-down menus, follow these steps. The procedure for creating a pop-up menu is identical, apart from the button you choose at the start:

  1. Choose the Menu Bar button. The editor shown here opens:
  2. Change the default identifier for the menu object to reflect your naming conventions, if desired.
  3. Enter the label for the first menu item. A corresponding identifier will immediately be generated in the Object field. Modify that identifier, if desired:
    • You must precede one of the letters in each label with an ampersand (&) so the user can choose the menu item from the keyboard. The choice of letter must uniquely identify the menu item within its group (bar or pull-down). If you have not determined where this item will reside, you can defer selecting a character until later.
    • By convention, a menu item on a pull-down ends in an ellipsis (...) if choosing it will open another level of pull-down or invoke a dialog box. Example: Save As...
    • If you wish to define string attributes for the label, enter them in the area to the right of the label. For further information, see the "String Attributes" section in "Frequently Used Dialogs."
  4. Repeat Step 3 until you have entered all the items that will appear anywhere in the menu system you are creating.
  5. Select each menu item that is to appear in a pull-down rather than on the bar. Mark it by choosing the >> button. You will see a dash appear in front of the item. The >> button can be used more than once, and each use will prepend another dash. The number of dashes indicates the nesting level of the pull-down on which the item will appear:
    • No dashes means the item will be on the menu bar itself.
    • One dash means the item will be on the main pull-down menu.
    • Two dashes means the item will be on a cascade/flyout menu off the pull-down.
    • Three dashes means the item will be on a second level of cascade menu.
    • If you change your mind, remove unwanted dashes by choosing the << button.

  6. Select each menu item and use the Up and Down buttons to move it into the correct position relative to the other items. The first item on a pull-down menu should appear immediately below the item that causes the pull-down to open. Example: in the figure shown in Step 1, the Cut item would be the first item in the Edit pull-down.
  7. If the item is a pull-down item, and is to appear with a check mark in front of it whenever selected, check the Toggle-box option.

  8. Arrange pull-down items into logical groups by inserting rule lines (Rule button) and nonselectable blank items (Skip button) as appropriate.
  9. Select each item that will be frequently used and define an accelerator (shortcut) key for it. Choose the Key button and, when the capture dialog appears, press the actual key or combination (such as CTRL-X for Cut) that is to become the shortcut.
  10. NOTE: To create a shortcut for an item on the menu bar, you must first change it to a pull-down item using the >> button. After you have defined the shortcut, move it back to the menu bar using the << button. The shortcut will remain defined.

  11. Select each item that will not be active on startup and check the Disabled box. Save your work.
Context-sensitive Help

If you plan to provide context-sensitive help, check the Context Help box and specify the full pathname of the relevant help file.

String Attributes, Window Color, Status Area Font

You can set several other characteristics of the Window, if you choose:

See the online help system for further information.

Advanced Properties

Choose the Advanced button to set additional properties. The Advanced Properties dialog box shown in Figure 3–2 will appear.

Figure 3–2: Window Advanced Properties Dialog Box

The Advanced Properties shown here are common to most objects. You can modify any that do not meet your needs:


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095