Introduction to PowerBuilder Powerbar
The following picture is the Powerbar that you see right under the menu in the PowerBuilder window. Let’s examine each menu option/toolbar icon one at a time.
This icon allows you to create a PowerBuilder object and store it in a PowerBuilder library. A PowerBuilder library is nothing but a file that has a collection of one or more PowerBuilder objects. For the operating system, it is one file like a database file, however, when open in PowerBuilder, you can all those objects that are stored in that file.
This icon allows you creating a new object by inheriting from an existing PowerBuilder object. Objects that can be inherited include Menu, Window and User objects.
icon.
This icon allows you running (executing) a Window or previewing a DataWindow.
While the File > Open allows you opening an object located in the current applications’ library list, this icon allows you opening an application object that is not located in the current applications’ library list.
This icon allows you specifying the current applications’ library list. At run-time, when you try to open an object, PowerBuilder looks in these libraries in the order it was specified. If multiple objects exist with the same name but in different libraries, it will open the first one it finds as per the library order.
This icon allows you to define to-do-list. Most of the wizards add entries to this list. Clicking on a to-do-entry will open the appropriate painter (if it is not open) and also the script editor for the specified event if the entry is linked to an event script. This option is explained in detail later in this session.
This icon opens the PowerBuilder object browser in which you can see all the system objects and objects from the current application along with the inheritance tree. You can also document the object hierarchy, events, functions and properties list in RTF format. This feature is explored in the sessions ahead.
This icon allows you to define database profiles that are used to connect to the database from a PowerBuilder application. This topic is explained in detail in the Database Painter session.
This icon invokes the File Editor. Typically, you use this editor for editing .INI files, exported PowerBuilder objects, resource files, etc. Shift+F6 is the short cut key for this icon.
Objects you create in PowerBuilder painters (application, windows, menus, functions, queries, structures, user objects and DataWindow objects) are stored in an operating system file with ".pbl" extension (pronounced as pible); In PowerBuilder terminology, this file is called a Library. The Library painter allows you to create and maintain PowerBuilder libraries and objects in those libraries.
Database painter allows you to create database objects—such as table, view, index, stored procedure, trigger, etc. without knowing the actual DDL syntax. All the database objects that you create in this painter are stored in the connected database and not in the PowerBuilder library. Objects that you create in other painters—such as window, menu painter are stored in PowerBuilder library. You can also do the database administration from this painter.
You guessed it right. A Run icon allows you to execute the application you are currently working on.
A Debug painter allows you to view the execution of the current application step-by-step and simplifies the discovery of bugs. It is very powerful and comes with all the debugging facilities you will ever need.
When you move the mouse pointer over toolbar icons, description for the specific toolbar icon is shown on Statusbar located at the bottom of the PowerBuilder window.
When the ShowPowerTips option (explained in a moment) is turned on, you will also see the short description or name of the icon right below the mouse pointer in a yellow colored rectangle. This yellow rectangle that moves along with the mouse pointer is called PowerTip.
To see how PowerTip works, switch to PowerBuilder from this web page and keep moving the mouse pointer over the toolbar icons slowly. If you don't see PowerTips, you don't have to worry. We will give the solution in a moment.
The basic purpose of the Powerbar is to allow you to invoke a painter or other tool. Clicking on an icon on the Powerbar invokes the corresponding painter. You can place Powerbar anywhere you like within PowerBuilder window. To move Powerbar, click anywhere in-between toolbar icons and drag it to the place intended.
Video demonstration of 'Moving the toolbar' (moving-toolbar.zip).
The placement of the toolbar can be selected from the popup menu by clicking the right mouse button on the Powerbar.
Powerbar can be customized. Simple customization includes:
- Showing/hiding the text below the toolbar icons
- Changing the text font & size, showing/hiding PowerTips
- Placement of the Powerbar
All of the above mentioned can be done by selecting proper options in the popup menu. Un-checking the Powerbar option hides it. Once you hide all toolbars, you can't show toolbars by selecting from the popup menu; the reason is being that you invoke the toolbar popup menu by right clicking on the toolbar itself. Since the toolbar itself is not visible, you cannot invoke the popup menu. Well, we have gotten ourselves into trouble here. There should be some way of making the toolbar visible. You can try selecting File > Window > Toolbars from the menu. In the dialog box shown above, along with the regular options, font related options are also available.
Double clicking in the space between icons on the toolbar invokes the toolbar dialogbox.
|