Copyright © 2024 | All Rights Reserved
Bitmap Button controls provide two options for displaying image content within a graphical panel:
Single Image Display: A single image is displayed on a button, much like an On Off Button.
Sequential Image Display: Several images are selected; the first is displayed by default, and the others shown based on user input. This is similar to the Graphical Display control, but instead of the display moving based on a signal value, the image shown changes when the mouse is clicked: a left-click goes forward (showing the next image in the sequence) while a right-click goes back (showing the previous image). An example can be seen in Figure 1.
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
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.