EditText
Description
An editable text field that the user can select and change.
Calls the?onChange()?callback if the text is changed and the user types Enter or the control loses focus, or if its?notify()?method is called. Calls the?onChanging()?callback when any change is made to the text. The?textselection?property contains currently selected text.
Properties
active readonly |
True if this element is active. |
alignment readonly |
The alignment style for this element. If defined, this value overrides the alignChildren setting for the parent container. |
bounds readonly |
The boundaries of the element, in parent-relative coordinates. |
characters readonly |
A number of characters for which to reserve space when calculating the preferred size of the element. |
children readonly |
An array of child elements. |
enabled readonly |
True if this element is enabled. |
graphics readonly |
The graphics object that can be used to customize the element’s appearance, in response to the?onDraw()?event. |
helpTip readonly |
The help text that is displayed when the mouse hovers over the element. |
indent readonly |
The number of pixels to indent the element during automatic layout. |
justify readonly |
The text justification style. |
location readonly |
The upper left corner of this element relative to its parent. |
maximumSize readonly |
The maximum height and width to which the element can be resized. |
minimumSize readonly |
The minimum height and width to which the element can be resized. |
parent readonly |
The parent element. |
preferredSize readonly |
The preferred size, used by layout managers to determine the best size for each element. |
properties readonly |
An object that contains one or more creation properties of the container (properties used only when the element is created). |
shortcutKey readonly |
The key sequence that invokes the?onShortcutKey()?callback for this element (in Windows only). |
size readonly |
The current dimensions of this element. |
text readonly |
The current text displayed in the field, a localizable string. |
textselection readonly |
The currently selected text, or the empty string if there is no text selected. |
type readonly |
The element type; “edittext”. |
visible readonly |
True if this element is shown, false if it is hidden. |
window readonly |
The window that this element belongs to. |
windowBounds readonly |
The bounds of this element relative to the top-level parent window. |
Methods
addEventListener readonly |
Registers an event handler for a particular type of event occuring in this element. |
dispatchEvent readonly |
Simulates the occurrence of an event in this target. |
hide readonly |
Hides this element. |
notify readonly |
Sends a notification message, simulating the specified user interaction event. |
removeEventListener readonly |
Unregisters an event handler for a particular type of event occuring in this element. |
show readonly |
Shows this element. |
Events
onActivate readonly |
An event-handler callback function, called when the element acquires the keyboard focus. |
onChange readonly |
An event-handler callback function, called when the content of the element has been changed |
onChanging readonly |
An event-handler callback function, called when the content of the element is in the process of changing |
onDeactivate readonly |
An event-handler callback function, called when the element loses the keyboard focus. |
onDraw readonly |
An event-handler callback function, called when the window is about to be drawn. |
onShortcutKey readonly |
An event-handler callback function, called when the element’s?shortcutKey?sequence is typed in the active window. |