Providing toolbars

To make your application easier to use, you can add toolbars with buttons that users can click as a shortcut for choosing an item from a menu. In PowerBuilder, you can associate a toolbar with the window types listed in Table 14-4.

Table 14-4: Window types that can use toolbars

Window type

Description

Main window

A main window is a standalone window that can be independent of all other windows. You use the main window as the anchor for your application. The first window your application opens is a main window (unless you are building an MDI application, in which case the first window is an MDI frame window).

MDI window

A window in a Multiple Document Interface application, an application in which users work within a frame window that lets them perform activities on multiple sheets of information. This is useful in applications where users require the ability to do several different things at a time. An MDI frame window has a menu bar, a client area, sheets, and (usually) a toolbar. An MDI sheet window is a window that can be opened in the client area of an MDI frame.

MDI Help window

An MDI window with a status area that can display MicroHelp.

Creating windows in PowerBuilder

You can create a main window, an MDI window, or an MDI Help window in PowerBuilder by clicking the New button in the PowerBar and selecting Window on the PB Object tab page. The new window’s type is Main by default. To change it to MDI or MDI Help, select the window type on the General page in the Properties view.

In MDI windows, you can associate a toolbar with the MDI frame and a toolbar with the active sheet. This screen shows New, Print, and Exit buttons on the toolbar associated with the MDI Frame, and window management buttons on the toolbar associated with the sheet. The toolbar associated with the MDI frame is called the FrameBar. The toolbar associated with the active sheet is called the SheetBar.

This screen shows New, Print, and Exit buttons on a toolbar associated with the Frame (the FrameBar), and the window management buttons Tile, Layer, Cascade, and Arrange on a toolbar associated with the sheets (the SheetBar).

This section provides you with the information you need to create and use toolbars. For information about customizing toolbar behavior and saving and restoring toolbar settings, see Application Techniques.