Class: TextInput

html.TextInput

Class representing a text input field.

new html.TextInput ()

Properties:
Name Type Description
bold bool

(default: false) Show text in bold face.

color html.Color

The text color.

fontFamily string

The font family.

fontSize number

The font size in CSS pixels.

horizontalAlignment string

(default: "left") Horizontal text alignment: left|center|right

password bool

(default: false) Whether this is a password entry field.

pattern string

(default: ".*") A regular expression pattern for restricting allowed input.

selectionBackgroundColor html.Color

The background color of selected text.

selectionColor html.Color

The color of selected text.

text string

(default: "") The text to show.

Extends

Methods

selectRange (begin, end)

Selects the given range.

Name Type Description
begin number

The text position of the begin of the selection.

end number

The text of position of the end of the selection.

Events

html.TextInput.event:reject

Is triggered when input was rejected due to not matching the pattern.

Name Type Description
text string

The rejected text.