documentation index ◦ reference manual ◦ function index

# Button

Function: | Button | (child, clicked=None, hovered=None, unhovered=None, role=, **properties):

This creates a button displayable that can be clicked by the user. When this button is clicked or otherwise selected, the function supplied as the clicked argument is called. If it returns a value, that value is returned from ui.interact.

child - The displayable that is contained within this button. This is required.

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

hovered - A function that is called when this button gains focus.

unhovered - A function that is called when this button loses focus.

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

documentation index ◦ reference manual ◦ function index