Graphical Panel Controls: Bitmap Button

Bitmap Button controls provide two options for displaying image content within a graphical panel:


Figure 1: An example Bitmap Button control showing how a user can use the mouse to simulate gear shifting.

Table 1 lists the properties specific to a Bitmap Button control.  A list of common properties can be found under Common Control Properties.

Table 1: Bitmap Button Control Properties

Property Function and Options
Action Dictates how the control functions:
  • 0-Push Button: The control works like a push button, returning a value of False by default, or True when clicked.
  • 1-Toggle: The control changes from False to True and back again each time it is clicked.
  • 2-Switch: Each left-click increments the value, and each right-click decrements it, allowing the user to step forward or backward through a set of images.
Image Launches a special dialog box that allows you to select one or more images for this control; an example of the interface can be found in Figure 2.

Use the + button to add an image to the control; after doing so, VSpy will show a preview of the image, along with its name, width, height, and Index Number.

Press the - button to remove an image previously selected.
FirstPixelIsTransparent Enables or disables transparency within the button:
  • 0-No: Transparency is disabled.
  • 1-Yes: Transparency is enabled, keyed on the color of the first pixel in the image. All pixels of that color are displayed as transparent.
DisplayOnly Allows the control to be set to an output-only mode:
  • 0-No: Control is input/output.
  • 1-Yes: Control is display only.
Stretch Specifies whether an image should be shown at its standard size, or stretched to fit the Bitmap Button control:
  • 0: Use native image size.
  • 1: Stretch image to fill control.



Figure 2: An example Graphical Display control image selection dialog box, showing the same image seen in Figure 1.


  Spy Documentation - (C) Copyright 1997-2022 Intrepid Control Systems, Inc.