Special Properties

TAB-TO-ADD (alphanumeric)

Assigning a value to this special property adds a new tab to the control. The value is the text of the tab. You may add several tabs at once by using parentheses, as shown in the following example:

MODIFY TAB-1, 
    TAB-TO-ADD = ( "TAB 1", "TAB 2", "TAB 3" )

This example adds three tabs in the order listed. Inquiring from this property has no effect.

TAB-TO-DELETE (numeric)

Assigning a non-zero value to this property removes the correspondingly numbered tab. Inquiring from this property has no effect.

RESET-TABS (numeric)

Assigning a non-zero value to this property removes all existing tabs from the control. Inquiring from this property has no effect.

BITMAP-HANDLE (numeric)

This property allows images from a bitmap file to be placed on individual tabs. The images are displayed before the text of each tab. Before a bitmap image can be placed on a tab, you must load the bitmap file into memory by calling the library routine W$BITMAP with the WBITMAP-LOAD option. The routine returns a handle that is referred to by this property of the tab control.

The bitmap file loaded into memory is treated as a bitmap strip - a series of images of equal width that are laid out side-by-side in a single bitmap. The images are numbered sequentially starting at 1. By default, each tab in the control displays the image whose number is the same as the tab's ordinal number when the tab was defined. If you take the following code as an example,

MODIFY TAB-1,  
    TAB-TO-ADD = ( "TAB 1", "TAB 2", "TAB 3" )

then by default, TAB1 will show image 1, TAB2 will show image 2, and TAB3 will show image 3. You may change the default handling of the assignment of these images with the BITMAP-NUMBER property. See BITMAP-NUMBER and BITMAP-WIDTH for additional information.

BITMAP-WIDTH (numeric)

This property sets the width of the images in the bitmap strip described by BITMAP-HANDLE. If this property is not set, the images default to 16-pixels wide. Set this property to match the actual width of the images that make up the bitmap strip to get the look that you desire for the tabs.

BITMAP-NUMBER (numeric)

This property identifies which bitmap image will be displayed for each tab. To use this property, set the value of BITMAP-NUMBER to the number of the image in the bitmap strip.

This property is additive. The first time you set the BITMAP-NUMBER, the image identified with the bitmap number will be displayed on the first tab; the second time you set this property, the image identified will be displayed on the second tab, and so on. The additive behavior of this property may be overridden in one of three ways:

  1. You may assign a value of 1 to this property.
  2. You may empty the tab control through RESET-TABS.
  3. You may specify a new list by keying in the bitmap numbers in parentheses, as shown in the example below.

The following Screen Section entry creates a tab control with three tabs, and places image numbers 3, 5 and 7 on those tabs:

03 TAB-CONTROL 
   TAB-TO-ADD = ("Tab 1", "Tab 2", "Tab 3") 
   BITMAP-NUMBER = (3, 5, 7) 

If you omit the BITMAP-NUMBER, the bitmap images are assigned in ordinal number by default. In other words, the following definition:

03 TAB-CONTROL 
   TAB-TO-ADD = ("Tab 1", "Tab 2", "Tab 3") 

has the same meaning as:

03 TAB-CONTROL 
   TAB-TO-ADD = ("Tab 1", "Tab 2", "Tab 3") 
   BITMAP-NUMBER = (1, 2, 3) 

When no value is set for this property, the default behavior is to automatically put bitmap number 1 on the first tab, bitmap number 2 on the second tab, and so on.