Skip to main content

InputText

Wolfram Kernel
Execution environment
Notebook`Kernel`Inputs`
Context
InputText[initial_String, opts___] _EventObject

represents an input-text field and returns EventObject

tip

For dynamic read-only indication use TextView

Event generation

Every-time user changes the content, an event in a form of string will be generated

"<current string>"

Options

"Label"

adds a label at the left side to the input text field

"Placeholder"

Text placeholder

"Description"

adds description field to a widget

ImageSize

sets the width in pixels

"Topic"

Specifies which topic or pattern of an event is used

"Topic" -> name_String

emits name for each time when user types

"Topic" -> {oninput_String, onchange_String}

emits oninput when any changes occur, while onchange is emitted after the users leaves the field

Example

A simple text input

text = InputText["Hi"]
EventHandler[text, Print];

Chaining events

One can reuse another event

InputText[event_EventObject, rest__]

Dev notes

This is a wrapper for TextView view-component

Supported output forms