Reference Manual: (offline | online) Quickstart: (offline | online)

ui.imagebutton

Function: ui.imagebutton( idle_image, hover_image, clicked=None, image_style='image_button_image', **properties)

This creates a button that contains two images. The first is the idle image, which is used when the mouse is not over the image, while the second is the hover image, which is used when the mouse is over the image. If the button is clicked or otherwise selected, then the clicked argument is called. If it returns a value, that value is returned from ui.interact .

idle_image - The file name of the image used when this button is idle.

hover_image - The file name of the image used when this button is hovered.

clicked - The function that is called when this button is clicked.

hovered - A function that is called with no arguments when this button is clicked. If it returns a non-None value, then that value is returned from ui.interact .

image_style - The style that is applied to the images that are used as part of the imagebutton.

role - The role this button undertakes. This can be the empty string, or "selected_".

Example

TODO
Reference Manual: (offline | online) Quickstart: (offline | online)