SetControlImage

Definition:

SetControlImage(control, string)

 

Description:

Display a picture from an image file in a Picture & Video Control or Ink Picture Control or load a video file into a Picture & Video Control.

 

Platforms:

All

 

Parameters:

control - required

Name of the control you want to modify.

 

string - required

Resource File Name or ID of the image or video you want to display (see Notes below).

 

Returns:

nothing

 

Notes:

  • The image or video file must be imported into your Project and then referred to here using the Resource File Name or ID name. The ID name is the name of the image or video as it appears in the Resources Pane tree view. To find the Resource File Name, select the image or video in the Resources Pane and then look in the File Name Property in the Properties Pane. Alternatively, for images, selecting the image in the Resources Pane will display its file name in the panel at the bottom of the Pane.

  • '.bmp', '.jpg', '.png' and '.gif' files are supported by Picture & Video Controls and Ink Picture Controls for images. '.mp4' files are supported for videos, but other file formats may also work (you will need to experiment on the devices you want to use).

  • On Android Platforms where you have a set of image files containing the same image at different sizes to cover different screen resolutions, using the @LOW, @HIGH etc. suffixes to identify which file is which, you should specify the base name of the Resource IDs, e.g. ID_IMAGE_MYPIC - see Multi-Resolution Image Sets with Android Platforms for more information.