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

# ui.textbutton

Function: ui.textbutton( | text, clicked=None, text_style='button_text', **properties)

This creates a button that is labelled with some text.

text - The text of this button.

clicked - 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().

hovered - A function that is called with no arguments when this button is focused. If it returns a non-None value, then that value is returned from ui.interact(). Documented since 5.6.6.

text_style - The style that is used for button text.

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

## Example

    python:
        while True:
            ui.textbutton("Continue", clicked=ui.returns(("done", True)), xminimum=250)

            type, value = ui.interact()

            if type == "done":
                break

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