setImage

>>--setImage(--imageObject--)-----------------------------------><

Sets or removes the image for the static control. An image can only be set with the image type static control.

Details

Raises syntax errors when incorrect arguments are detected.

Programmers should manage the image objects as they think best. See the .Image documentation for a discussion of this. The static control does not make a copy of the image, nor does it release an image.

Arguments:

The arguments are:

imageObject

A .Image object that represents the image for the control, or .nil to remove an existing image. The image object can be any image type, including an icon image.

Return value:

This method returns the existing image object, if there is one. Otherwise .nil is returned.

Example:

image = .Image~getImage("Camera.bmp", .Image~toID(IMAGE_BITMAP))
if \ image~isNull then do
  oldImage = staticControl~setImage(image)
  if oldImage \== .nil then oldImage~release
  ...
end
else do
  -- handle error
  ...
end