Image

Image is derived from Control class.

[lide.widgets] ^1.0 lide.widgets.controls.image 1.0

A static bitmap control displays a bitmap.

Native implementations on some platforms are only meant for display of the small icons in the dialog boxes.

Notice that for the best results, the size of the control should be the same as the size of the image displayed in it, as happens by default if it’s not resized explicitly. Otherwise, behaviour depends on the platform: under Windows, the bitmap is drawn centred inside the control, while elsewhere it is drawn at the origin of the control.


Constructor

Image class has a complex constructor:

object Image:new {
               number ID, string Name,
               object Parent, Text = 'My Image'
       }

Events

The following events are emitted by this class:

Event name Description
Widget.onEnter When the mouse moves onto this widget.
Widget.onLeave When the mouse moves out to this widget.

Inherited Methods

These methods are inherited from its super classes:

Class Method Description
Object:getName Returns object’s name.
Object:setName Sets the object name.
Widget:getParent Returns object’s parent.
Widget:setParent Sets the object parent.
Widget:getPosX Returns object’s position related to X.
Widget:setPosX Sets the object position related to X.
Widget:getPosY Returns object’s position related to Y.
Widget:setPosY Sets the object position related to Y.
Widget:getWidth Returns object’s width.
Widget:setWidth Sets the object width.
Widget:getHeight Returns object’s height.
Widget:setHeight Sets the object height.
Widget:getBind Returns the wxWidgets object.

Image:getFile

Returns the bitmap file currently used in the Image control.
string Image:getText( )

Image:setFile

Sets the control’s Image from file.
void Image:setText( string sFilePath )

Image:getDepth

Gets the colour depth of the bitmap. A value of 1 indicates a monochrome bitmap.
number Image:getDepth( )