
CHAPTER 4: User-Interface Tools Control objects 125
dropdownlist DropDownList
A drop-down list with zero or more items. Calls the onChange
callback if the item selection is changed by a script or the user, or if
the object’s notify()
method is called.
To add to a window
w:
w.add ("dropdownlist", bounds [, items,
{creation_properties}]);
bounds
: The control’s position and size.
items: Optional. Supply this argument or the
creation_properties argument, not both. An array of strings
for the text of each list item. A
ListItem object is created for
each item. An item with the text string
"-" creates a separator
item.
creation_properties: Optional. Supply this argument or the
items argument, not both. This form is most useful for elements
defined using Resource specifications
. An object that contains
the following property:
name: A unique name for the control.
items: An array of strings for the text of each list item. A
ListItem object is created for each item. An item with the
text string
"-" creates a separator item.
edittext EditText
An editable text field that the user can change. Calls the onChange
callback if the text is changed and the user types E
NTER 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.
To add to a window
w:
w.add (“edittext” [,
bounds
,
text
,
{
creation_properties
}]);
bounds: Optional. The control’s position and size.
text: Optional. The text displayed in the control.
creation_properties: Optional. An object that contains any of
the following properties:
name: A unique name for the control.
readonly: When false (the default), the control accepts text
input. When true, the control does not accept input but only
displays the contents of the
text property.
noecho: When false (the default), the control displays input
text. When true, the control does not display input text
(used for password input fields).
Type keyword Class name Description
Comentários a estes Manuais