TextArea

Version: 9.0

A TextArea control is a text box where users can enter input. Users can enter multiple lines of text (as opposed to the TextBox control, where users can enter only one line of text).

You can set a watermark or a default text that the TextArea control displays. A watermark is a non-editable text that the TextArea control displays when it is empty. You can enter a text that helps users to understand what they can enter. The watermark disappears as soon as the user enters a character, and it reappears if the user deletes all previously entered characters.

A default text is a text that the control displays, but users can change and delete this text. If you specify both a watermark and a default text, the TextArea control initially displays the default text but, if the user deletes all of this text, the watermark appears.

You can specify rows and columns to size the TextArea control. If you do not specify any of these, SPEAK gives the control a default size. The rows and columns are not absolute dimensions. They correspond directly to the Rows and Columns attributes in HTML.

Some browsers make it possible for users to resize the TextArea control. These browsers display a resizing handle in the bottom-right corner of the TextArea control. You cannot resize the control to be smaller than the size it was initially. Other controls can move around when users resize the TextArea control.

Properties

Name

Description

Default

Appearance

Columns

Specify the width of the control in columns. The “columns” are HTML columns.

Rows

Specify the height of the control in rows. The “rows” are HTML rows.

Text

Specify a default text that the control displays. Users can edit and delete this text.

Watermark

Specify a text that the control displays when it has no input from the user. The text is not editable, and it is not shown if there is no user input.

WidthPolicy

Specify how SPEAK interprets the width of the control. You can specify:

  • Default: the default width of the control is used. If you specify a value in Columns, SPEAK uses this value.

  • BlockLevel: the width is set relative to the width of the container. A value set in Columns is disregarded. The TextArea control fills the container horizontally.

Default

Behavior

MaxLength

Specify the maximum number of characters users can input in the TextArea control. The control does not accept any more input when this number is reached.

Wrap

Specify how the control wraps input lines that are longer than the width of the control:

  • soft: Text wraps, but no return and line feed characters are inserted.

  • hard: Text wraps, and return and line feed characters are inserted.

  • off: the text does not wrap. Some browsers display a horizontal scrollbar when the length of the line exceeds the width of the TextArea control.

soft

Configuration

You can create a configuration item for a TextArea control by creating an item based on the TextArea Parameters template.

The configuration item has these specific fields:

  • Columns

  • Rows

  • Watermark

  • Text

It inherits these fields:

  • IsEnabled

  • IsVisible

  • AccessKey

  • Tooltip

  • Behaviors

  • Id

Do you have some feedback for us?

If you have suggestions for improving this article,