User Tools

Site Tools


image_element

This is an old revision of the document!


Image


An image is a widget element for displaying a static image.

Element Properties

IconPropertyDescription
Element IDID for the image. This ID must be unique amongst other elements within the same widget. It is currently auto-generated but will be editable in a future update.
ImageImage that will be displayed.
Stretch ModeDetermines how the source image will be rendered within the element. See Image Stretch Modes for an explanation of each option.
Left MarginAmount of padding (in pixels) that will be added to the left of the image.
Right MarginAmount of padding (in pixels) that will be added to the right of the image.
Top MarginAmount of padding (in pixels) that will be added to the top of the image.
Bottom MarginAmount of padding (in pixels) that will be added to the bottom of the image.

Scripting

You can access and change certain properties of an image from within a script by simply referencing the parent widget and the element by their unique IDs. See below for an example of changing the element's image. In this case, the widget has an ID of “test” and the image has an ID of “0001”.

Changing an element's image:

widget["test"].element["0001"].image = "new_image.png";
image_element.1619061805.txt.gz · Last modified: 2021/04/21 20:23 by justin