Modifying an existing style

The easiest way to get started building form styles is to copy an existing form style and work with it. By examining its structure and making small changes, you can quickly understand how form styles work.

To begin by modifying an existing form style:

  1. Open the Library painter in PowerBuilder.

  2. Copy the window and menu that serve as the foundation for a form style to a library that is on your application's library search path.

    Starting from a built-in form style

    The windows and menus that serve as the basis for the built-in form styles are in IMSTYLE190.PBL, which is shipped with InfoMaker and installed in the InfoMaker 2019 R2 directory. You can make a copy of this PBL and use it as the basis of your own form styles.

  3. Open the window in the Window painter and select File>Save As from the menu bar to save it with a new name.

  4. Give the window a new name.

    You can use any name you want, except that names of windows that define form styles must be unique across all style libraries that are used by an InfoMaker user.

  5. Define a special comment for the window (for instructions, see Identifying the window as the basis of a style).

  6. Click OK to save the window.

  7. Open the menu in the Menu painter and select File>Save As from the menu bar to save it with a new name.

  8. Provide a new name and an optional comment, then click OK to save the menu.

    You do not need to provide a comment for the menu, but it is a good idea to identify it as being used in the form style you are building.

  9. Enhance the form style (for instructions, see Completing the style ).

Identifying the window as the basis of a style

In order for InfoMaker to recognize that a window in a library serves as the basis for a form style, you must specify a comment for the window that starts with the text Style:

Style: text that describes the style

The text that follows Style: is the text that displays below the icon for the form style in the New Form dialog box in InfoMaker.

For example, if you save a w_pbstyle_freeform window with the comment Style: Maintain corporate data in a style library, InfoMaker users see this when they create a new form:

You can specify the comment either when first saving the window or in the Library painter.

For more information about designing windows, see Working with Windows in Users Guide.