Phone API Reference - UI Classes (Widgets) - Image

Desk Phone API features described in this section are deprecated and supported only on the following models: D40, d45, d50, d60, d62, d65, d70

Widget that displays an image file on the screen using a location and filename.

Class Constructor

new Image()

For images stored in the app's directory, location should be set to app, and filename should be set to the name of the image file.Construct a new Image Object.

 var imgObj = new Image("location", "filename", x, y, w, h);

 

Initialization Parameters

None

This Class inherits methods and properties from the Widget Base Class. See  Widget Base Class  for more information about setting your Object's x, y, w, and h properties or adding children to it.

 

Methods

Name 

Description 

Name 

Description 

reload

Reloads the image from disk. This is needed to clear the UI drawing cache. Should only be used if a new image is written over an existing one of the same name that has been used in the current run of the app.

resize

Changes the size of the image. If either width or height is set to 0, the image will be scaled to the other width/height, maintaining the aspect ratio.

Return to Documentation Home I Return to Sangoma Support