BtnPix Property
Applies To: Button Menu MenuItem

Description

This property is used to customise the appearance of a Button, Menu or MenuItem. It specifies the names of or refs to up to 3 Bitmap objects to be used to display the object under different circumstances. In general, BtnPix is a 3-element vector of character vectors or refs. However, if it defines a single Bitmap, it may be a single ref, a simple character scalar or vector, or an enclosed character vector.

The first Bitmap is displayed when the object is shown in its normal state. For a Button, this is when its State is 0. The second Bitmap is used for a Menu or MenuItem, when the object is selected (highlighted), or for a Button when its State is 1. The third Bitmap is used when the object is disabled by having its Active property set to 0.

For a Button with Style 'Push', this means that when the user clicks the Button, its appearance switches from the first to the second Bitmap, and then back again. To maintain the standard 3-D appearance, the Bitmaps should contain the correct shadow lines around their edges. For Buttons with Style 'Radio' or 'Check', the Button will display one or other of the two Bitmaps according to its current State.

For example, to have a Button that displays a "Tick" or a "Cross" according to its State:

      'YES' ⎕WC 'Bitmap' 'C:\WDYALOG\YES.BMP'
      'NO'  ⎕WC 'Bitmap' 'C:\WDYALOG\NO.BMP'
      'f1.r1' ⎕WC 'Button'('Style' 'Check')
                          ('BtnPix' 'YES' 'NO')