class controls.ImageButton(ButtonBase, Widget)

An ImageButton is a button whose appearance is defined by an image.


ImageButton(text, image = None, action = None, enable = None)
Initializes the button with the given image. The size of the button is determined by the image. The action should be a callable object of no arguments; it will be called when the mouse is clicked and released again inside the button. If supplied, enable should be a function returning a boolean; it will be used to determine whether the button is enabled.

Theme Properties

Colour in which to display the text while mouse has been clicked but not yet released.


True if the button is enabled. If no enable function was supplied in the constructor, this property may also be assigned in order to enable and disable the button.