From Liberty BASIC Family
Jump to navigation Jump to search
Not supported in Just BASIC Not supported in Liberty BASIC Not supported in Liberty BASIC 5 Supported in Run BASIC


An ImageButton is a LINK in boxed form displaying an image.


  1. IMAGEBUTTON #handle, imagePath$, handler - Add an image button to the page using handle, imagePath$, and handler


The imagePath$ is the path to the image. This image should be stored in the Run BASIC public folder. When the user clicks on the image-button, the event handler specified is activated. It can be either a sub or a branch label. If the handler is a sub, the handle of the image-button is passed into the sub. If the handler is a branch label, the global variable EventKey$ is set to be the handle of the image-button.
Supported image-button methods


'create an imagebutton with sub event handler
imagebutton #doStuff, "\runbutton.png", doStuff

'create an imagebutton with branch label event handler
imagebutton #doMore, "\openbutton.png", [doMore]


sub doStuff handle$
print:print "Handle is ";handle$
end sub

print:print "Handle is ";EventKey$

Useful Procedures

' Place a useful function or sub using this keyword here