Special Properties

BITMAP-NUMBER (numeric)

This property identifies a particular bitmap image to use as the push button. If you explicitly name this property when creating a control, the BITMAP style is automatically applied by the compiler. Note that this does not occur if you use the PROPERTY phrase to specify this property by giving its identifying number. See Bitmap Buttons for more information.

BITMAP-HANDLE (handle)

This property identifies the bitmap image strip to use with the push button.

BITMAP-SCALE

This property is used to enable resizing of bitmaps. If not set, or set to its default value of 0, the bitmap cannot be resized. This means if the size of the interior of the image is smaller than the image, the image is cut to fit. If the interior is larger than the image size, the image size does not increase to fill the interior.

If set to 1, the bitmap will scale up or down to fit the interior given, and no cutting of the bitmap occurs.

When setting this property, you must set it prior to setting the property BITMAP-HANDLE to have any effect. For example:

SCREEN      SECTION.
01  TEMPLATE-SCREEN.
  03      bmp              BITMAP
          BITMAP-SCALE     1 
          BITMAP-HANDLE    GT-BITMAP
          SIZE             100 pixels
          LINES            200 pixels
          LINE             1
          placeStateCOL              1.

With this new property, if you perform a MODIFY statement such as

MODIFY bmp SIZE = 200 LINES = 400.

the bitmap is resized accordingly and automatically. Note that you are not limited to specifying pixel units; you may specify any legal display unit.

Important:

To keep the image from becoming blurred in the resizing process, do not scale up or down in just one direction. For example, if you have an image that is 200x300, increase or decrease the width and height, not just one or the other.

If you enter an invalid resizing value for either the width or height, the invalid entry will be ignored and the previous width or height value will be used.

Resizing images is based on the image size, not the interior size. With multiple resizes, you always will be resizing based on the original image size, not the last resizing that you performed. This is done to maintain the best image quality, as resizing a resized image can degrade image quality.

Currently, only 24-bit colors are supported. If your bitmap is not 24 bit, you can use Microsoft paint to store the bitmap as 24 bit.

We recommend that jpeg files be used whenever possible, as they appear to give the best resizing capability.

TERMINATION-VALUE (numeric)

This property modifies the way that a push button communicates to your program when it has been pushed. Normally, a push button will generate a CMD-CLICKED event. If you provide a non-zero TERMINATION-VALUE, the push button will generate a termination condition with the specified value instead. This makes the push button act like a keyboard termination key. Most existing COBOL programs are already coded to handle termination keys, so this is easier for the COBOL program to work with.
Note: If you assign the DEFAULT-BUTTON style and a TERMINATION-VALUE property of 13, then the effects of typing the Return key may seem rather odd. The DEFAULT-BUTTON style converts the Return key's termination event into a button pushed event. The TERMINATION-VALUE property then changes the button pushed event into a termination event with a value of 13. The net effect is the same as if neither the style nor property had been used. The reason for this lengthy route is to ensure that the button and Return key are handled identically, and to provide options for programming push button handling, such as the setting of TERMINATION-VALUE.

EXCEPTION-VALUE (numeric)

This property works in a fashion that is identical to the TERMINATION-VALUE property, except that it converts button pushed events into exception events (instead of termination events). If a button has both a TERMINATION-VALUE and an EXCEPTION-VALUE specified, the EXCEPTION-VALUE takes precedence.