ui_edit.eh

Constants for text editing UI components. More...

use "ui_edit.eh"

Constants

const EDIT_ANY = 0
const EDIT_DECIMAL = 5
const EDIT_EMAIL = 1
const EDIT_NUMBER = 2
const EDIT_PASSWORD = 0x10000
const EDIT_PHONE = 3
const EDIT_URL = 4

Description

This header defines constants that may be used to specify mode of text editing components - EditItem and EditBox. Depending on input mode component may restrict range of available characters or switch to special input mode. For example, EDIT_NUMBER mode accepts only numeric input. In EDIT_PASSWORD mode input is hidden, usually by displaying all characters as "*" though platform may use other ways of obscuring.

There is no need to include this header explicitly with use directive - it is used included automatically by both form.eh and stdscreens.eh.

Constant details

const EDIT_ANY = 0
The user is allowed to enter any text. The input is not restricted and may contain line breaks.

const EDIT_EMAIL = 1
The user is allowed to enter an e-mail address. The input is restricted to characters allowed in e-mail addresses.

const EDIT_NUMBER = 2
The user is allowed to enter only an integer value. The input is restricted to digits and minus sign. Unless the text of component is empty, it will be successfully parsable using String.toint.

const EDIT_PHONE = 3
The user is allowed to enter a phone number. The exact set of characters allowed is specific to the device and to the device's network and may include non-numeric characters, such as a "+" prefix character.

const EDIT_URL = 4
The user is allowed to enter a URL. The input is restricted to characters allowed in URL addresses.

const EDIT_DECIMAL = 5
The user is allowed to enter numeric values with optional decimal fractions such as "-123", "0.123", or ".5". The input is restricted so that only decimal numbers are allowed. Unless the text of component is empty, it will be successfully parsable using String.todouble.

const EDIT_PASSWORD = 0x10000
Indicates that text entered in a editbox is confidential data that should be obscured. This mode is useful for entering confidential information such as passwords. This mode can be OR-combined with another EDIT_* mode, for example (EDIT_NUMBER|EDIT_PASSWORD) is allowed.