Using the General property page

Use the General property page to specify the following window information:

Specifying the window's type

The first thing you should do is specify the type of window you are creating.

StepsTo specify the window's type:

  1. In the Properties view for the window, select the General tab.

  2. Scroll down the property page and select the appropriate window type from the WindowType drop-down list.

    Shown is the Window Type drop down list. At top is a selected check box labeled Resizable, a grayed check box labeled Border, and then a drop down list of window types with main ! selected.

Depending on the type of window, PowerBuilder enables or disables certain check boxes that specify other properties of the window. For example, if you are creating a main window, the Title Bar check box is disabled. Main windows always have title bars, so you cannot clear the Title Bar check box.

Specifying other basic window properties

By selecting and clearing check boxes on the General property page, you can specify whether the window is resizable or minimizable, is enabled, has a border, and so on.

Note the following:

.

Associating a menu with the window

Many of your windows will have a menu associated with them.

StepsTo associate a menu with the window:

  1. Do one of the following:

  2. Click the Preview button in the PainterBar to see the menu.

    For information about preview, see “Viewing your work”.

NoteChanging the menu You can change a menu associated with a window during execution using the ChangeMenu function. For more information, see the PowerScript Reference.

Choosing a window color

You can change the background color of your window.

StepsTo specify the color of a window:

  1. Do one of the following:

    .

Changing default window colors

For main, child, pop-up, and response windows, the default color is ButtonFace if you are defining a 3D window, and white if you are not. If you or the user specified different display colors in the Windows Control Panel, a 3D window will display in the color that is set for the window background.

You can change the default for windows that are not 3D in the Application painter Properties view. To do so, click the Additional Properties button on the General page and modify the Background color on the Text Font tab page. New windows that are not 3D will have the new color you specified.

For more about using colors in windows, including how to define your own custom colors, see Chapter 12, “Working with Controls.”

Choosing the window icon

If the window can be minimized, you can specify an icon to represent the minimized window. If you do not choose an icon, PowerBuilder uses the application icon for the minimized window.

StepsTo choose the window icon:

  1. Click the window's background so the Properties view displays window properties.

  2. Select the General tab.

  3. Choose the icon from the Icon drop-down list or use the Browse (...) button to select an icon (.ICO) file.

    The icon you chose displays in the Icon list.

NoteChanging the icon during execution You can change the window icon during execution by assigning in code the name of the icon file to the window's Icon property, window.Icon.