Use the General properties page to specify the following window information:
Window type
Title bar text
Menu name
Navigation bar button (OK or X)
IDE window size (design-time window size)
Color
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.
Main 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.
The first thing you should do on the General properties page is specify the type of window you are creating.
To specify the window's type:
In the Properties view for the window, select the General tab.
Scroll down the property page and select the appropriate window type from the WindowType drop-down list.
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:
A main window must have a title bar. It has a default minimum size and cannot be repositioned through the PocketBuilder IDE.
A response window cannot have a menu. (Response windows should not be used on the Smartphone.)
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.
To associate a menu with the window:
Do one of the following:
Enter the name of the menu in the Menu Name text box on the General properties page.
Click the Browse button and select the menu from the Select Object dialog box, which displays a list of all menus available to the application.
Click the Preview button in the PainterBar to see the menu.
For information about preview, see “Viewing your work”.
Changing 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.
You can change the background color of your window.
To specify the color of a window:
Specify the color of the window from the BackColor drop-down list on the General properties page
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.”