Many Windows products use tab controls to make complex screens easier to navigate. Since I'm writing in MS-Word 6.0, I have an excellent example of a tab window in choosing the menu choices Tools/Options. The result is a 12-tab dialog window that lets me set all of the .INI file values for Word. In PowerBuilder, you can use tabs in much the same way to navigate around screens that contain more information than comfortably fit in one window. For example, see figure 1.
Unfortunately, PowerBuilder doesn't include tab controls as standard controls. However, it does include user objects, so it's fairly easy to develop tab controls.
A tab control is created by combining two user objects. The first one is the tab. Since we're creating a tab control that hangs from the bottom, the name of this control is u_bottom_tab. This is a contained class--that is, a class that is always contained within another class, like a menu item on a menu. The class containing the tab control will be called u_bottom_bar. The goal is to design the classes so the minimum amount of programming is required when the tab controls are used on a window.
Developing the tab object
The first step in developing a tab bar in PowerBuilder is to develop a tab object. In the user object painter, a custom user object, u_bottom_tab, is created that has two controls on it. The controls are a static text control, st_1, and a picture control, p_1. The object is in figure 2. …