"buttonDownPixmap"

Gets or sets the graphic that will be displayed when a button is pressed.

Synopsis

getValue(string shape, "buttonDownPixmap", string &image);

setValue(string shape, "buttonDownPixmap", string pixmap);

shape.buttonDownPixmap(pixmap);

Parameter

Parameter Description
shape Name of the object
pixmap

The graphics loaded from the directory <proj_path>/pictures. The following formats are supported: bmp, gif, jpg, png, pbm, pgm, ppm, xbm, xpm, svg, dds, icns, jp2, mng, tga, tiff, wbmp, webp

Please note that the used pixmap must be located within the /pictures directory.

image Absolute path to the image.

Description

Defines the graphic that will be displayed when a button is pressed.

The property can also be used to query the used image. In this case the absolute path to the image is returned.

Example

With the following script, you can change between two images as well as display an addiotonal text.

main()
{
  this.buttonType(BT_PIXMAP_TEXT);
  this.buttonDownPixmap = "PVSS.gif";
  this.buttonUpPixmap = "download1.gif";
}

or also

main()
{
  setValue("","buttonType", BT_PIXMAP_TEXT, "buttonDownPixmap", "PVSS.gif", "buttonUpPixmap", "download1.gif");
}
Abbildung 1. An image is shown when the button is pressed

Assignment

Button