The Image Button Object
var btnSample = new TImageButton(325, 100, 'images/docs/click-me.jpg');
var layHorizontal = new THorizontalLayout();
var wndImageButtonSample = createWindow('Image Button Sample');

layHorizontal.add(btnSample);
wndImageButtonSample.add(layHorizontal);
showModal(wndImageButtonSample);

Image button constructor takes five parameters:

new TImageButton(width, height, urlNormal, urlSelected, urlDisabled);

You must provide URL for normal state. If you do not provide URL for selected state or disabled state, they will take normal state URL by default.

Image Button Methods and Properties
Method/Property Description
disable Disables the image button object
enable Enables the image button object
setOnClick Sets an event handler for the click event on the image button object. Form:
setOnClick(handler)