Share

Image

[Desktop Automation]

The Image UI element is used to place an image in Lua-defined UI. It is created by controlcontainer:addimage().

Properties

Property Read/write Type Description
height Read/write Number Height of the image UI element
hint read/write string Hint or tooltip for the button
keepratio Read/write Boolean Keep the aspect ratio. This will only have an effect when only either width or height are set and when the stretch parameter is set to true
picture Read/write String/Object The image to be shown in the UI element. Can either be a string referencing an image file or an Image Object
onclick Read/write String Onclick listener to handle Onclick event of the image
mousex Read Number X-Position of the mouse, useful after onclick event
mousey Read Number Y-Position of the mouse, useful after onclick event
stretch Read/write Boolean Should the image be stretched to the size defined by width and height?
width Read/write Number Width of the image UI element

Back to top

Methods

Name Syntax Description
setgraph image:setgraph(graphobject); Sets a Graphobject as the image. (Set image height and width first.)
setimage Image:setimage(imageobject); Sets an image-object as content. See image-processing section
setmousehandler Image:setmousehandler(handler); Sets an interactive mousehandler. (Graph drawer Object)

Back to top

See also

Was this information helpful?