TextAreaInputMode

Since: BlackBerry 10.0.0

#include <bb/cascades/TextAreaInputMode>

Represents a text input mode for the TextArea.

The TextAreaInputMode determines how the TextArea behaves in relation to its text input. Each input mode has a default set of properties that specify what symbols appear on the keyboard and how the input is displayed in the field. For example, the Chat mode contains functionality that allows users to specify emoticons that can be rendered on the screen. You can change the default properties for each mode by turning them on or off using TextContentFlag and TextInputFlag.

If the TextAreaInputMode::Custom mode is set, no TextInputFlag values will be available except for TextInputFlag::VirtualKeyboard and TextInputFlag::VirtualKeyboardOff.

For a TextField, you must use TextFieldInputMode.


Overview

Public Types Index

Public Types

Type

Text input modes for a TextArea.

Since:

BlackBerry 10.0.0

Default

The default text input mode for a TextArea.

Text

An input mode for plain text entry.

Since:

BlackBerry 10.0.0

Chat

An input mode for chat conversations.

Since:

BlackBerry 10.0.0

EmailAddress

An input mode for email addresses.

Since:

BlackBerry 10.0.0

Custom

An input mode for custom input.

Custom input mode will ignore all key input. Key events have to be handled by the application.

For text editing, you could use the @ TextEditor class to add text and maintain the cursor position. If the application uses TextArea::setText(), the cursor position will be reset.

When Custom input mode is set, only the TextInputFlag::VirtualKeyboard and TextInputFlag::VirtualKeyboardOff values are available. The other flags in TextInputMode must not be altered from the default state. Spell checking and features from the Input Method Framework, such as word prediction, will be disabled. The application could implement its own integration with the Input Method Framework if such features are required.

When Custom input mode is set, the TextArea will also not handle submit keys or keyboard shortcuts.

Since:

BlackBerry 10.2.0

Last modified: 2014-09-30



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus