documentation index ◦ reference manual ◦ function index
Function: | ui.input | (default, length=None, allow=None, exclude='{}', button=None, changed=None, prefix="", suffix="", **properties): |
This displays a text area that accepts input from the user. Only ASCII is input reliably, although some non-ASCII languages may also work on some platforms.
default - The default value for the text area.
length - If not None, a limit on the number of characters that can be input.
allow - If not None, a string containing the characters that are allowed.
exclude - A string containing characters that are no allowed. The brace characters should always be disallowed, since they may accidentally cause a text tag to be shown.
button - If not None, then this should be a button. The input is only active when this button is focused.
changed - If not None, then this function is called when the text is changed.
prefix - A prefix included before the text to be edited.
suffix - A suffix included after the text to be edited.
If changed is None, then the text is returned as the result of ui.interact() when enter is pressed. Otherwise, this cannot cause ui.interact() to terminate.
label prompt_for_name: $ ui.text("Please enter your name:", xalign=0.5, yalign=0.4) $ ui.input('', xalign=0.5, yalign=0.5) $ name = ui.interact() if name == '': $ name = 'Guy Shy'