Using the General properties page

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

Depending on the type of window, PocketBuilder 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 selected and disabled. Main windows always have title bars, so you cannot clear the Title Bar check box.

By default, the title of a main window is Untitled (except if the window is created by the Template Application wizard, in which case the default window title is Main Window). You can change the window title by replacing the text in the Title box.

NoteMain windows must have titles If you delete a title for a main window, you risk creating problems for application users on Windows CE devices. Applications without titles are not included in the list of running programs on these devices. If users start a different program or otherwise minimize a title-less PocketBuilder application, they might have difficulty redisplaying the application, or even closing it, without performing a soft reset.

Specifying the window's type

The first thing you should do on the General properties page 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.

Specifying other basic window properties

By selecting and clearing check boxes on the General property page, you can specify whether the window is enabled, has a menu bar, has an OK button in the navigation bar, and so on.

Note the following:

Associating a menu with the window

Only main windows can have a menu associated with them. If you do not associate a named menu with a main window, you can still select the MenuBar property on the General page of the Properties view for the window. Selecting this property resizes the window at design time, allowing you to see how much space would be left in the window if you added a menu dynamically at runtime.

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 At runtime, you can change a menu associated with a window by using the ChangeMenu function. For more information, see the online Help.

Choosing a window color

You can change the background color of your window.

StepsTo specify the color of a window:

  1. Specify the color of the window from the BackColor drop-down list on the General properties page

Changing default window colors

The default window background color for new windows is ButtonFace if you are defining a 3D window, and white if you are not. (If you have specified different display colors for 3D objects in the Windows Control Panel, the default color for a new 3D window will be the color that you set, rather than ButtonFace.)

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 11, “Working with Controls.”