User Tools

Site Tools


image_element

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
image_element [2020/11/30 18:53] – created justinimage_element [2024/02/21 21:14] (current) justin
Line 6: Line 6:
 =====Element Properties===== =====Element Properties=====
 ^Icon^Property^Description^ ^Icon^Property^Description^
 +|{{:wiki:tag_id.png?nolink|}}|Element ID|ID 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.|
 +|{{:wiki:image.png?nolink|}}|Image|[[Image]] that will be displayed.|
 +|{{:wiki:arrow_in_out.png?nolink|}}|Stretch Mode|Determines how the source [[image]] will be rendered within the element. See [[Stretch Mode]] for an explanation of each option.|
 +|{{:wiki:margin_left.png?nolink|}}|Left Margin|Amount of padding (in pixels) that will be added to the left of the image.|
 +|{{:wiki:margin_right.png?nolink|}}|Right Margin|Amount of padding (in pixels) that will be added to the right of the image.|
 +|{{:wiki:margin_top.png?nolink|}}|Top Margin|Amount of padding (in pixels) that will be added to the top of the image.|
 +|{{:wiki:margin_bottom.png?nolink|}}|Bottom Margin|Amount of padding (in pixels) that will be added to the bottom of the image.|
  
 =====Scripting===== =====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".
  
-(Accessing/changing properties of the element via scripts)+**Changing an element's image:** 
 +<code bauxite> 
 +widget["test"].element["0001"].image = "new_image.png"; 
 +</code>
  
 ~~NOTOC~~ ~~NOTOC~~
image_element.1606791226.txt.gz · Last modified: 2020/11/30 18:53 by justin