This object represents a window asking the user to enter data.
Functions
Syntax
var myObject = new InputDialog();
var myObject = new InputDialog(parameters);
Arguments
parameters - (object) window parameters
title - (string) the window's title
position - (
Point) the window's position
opacity - (float) the window's opacity
enabled - (boolean) the window's enabled status
visible - (boolean) the window's visible status
labelText - (string) the label text
okButtonText - (string) the text of the ok button
cancelButtonText - (string) the text of the cancel button
-
floatDecimals - (integer) the number of decimals
integerStep - (integer) the integer step
minimum - (mixed) the minimum value
maximum - (mixed) the maximum value
range - (object) the range
-
value - (mixed) the default value
items - (array) the items (used when asking an item from a list)
itemsEditable - (boolean) are the items from the list editable
onClosed - (
OnClosed) event called when the window is closed
-
Exceptions
Example
var myObject = new InputDialog();
var myObject = new InputDialog({
title: "Enter text:",
inputType: InputDialog.Text
});
Methods
setTitle
Syntax
myObject.setTitle(title);
Arguments
title - (string) the window's title
Returns
setPosition
Sets the window's position.
Syntax
myObject.setPosition(point);
Arguments
point - (
Point) the window's position
Returns
setOpacity
Sets the window's opacity.
Syntax
myObject.setOpacity(opacity);
Arguments
opacity - (float) the window's opacity
Returns
setEnabled
Sets the window's enabled status.
Syntax
myObject.setEnabled(enabled);
Arguments
enabled - (boolean) the window's enabled status
Returns
setVisible
Sets the window's visible status.
Syntax
myObject.setVisible(visible);
Arguments
visible - (boolean) the window's visible status
Returns
close
Syntax
Returns
title
Returns the window's title.
Syntax
Returns
position
Returns the window's position.
Syntax
Returns
(
Point) the window's position
opacity
Returns the window's opacity.
Syntax
Returns
enabled
Returns the window's enabled status.
Syntax
Returns
visible
Returns the window's visible status.
Syntax
Returns
setLabelText
Syntax
myObject.setLabelText(text);
Arguments
text - (string) the label text
Returns
setOkButtonText
Syntax
myObject.setLabelText(text);
Arguments
text - (string) the ok button's label
Returns
setCancelButtonText
Sets the cancel button text.
Syntax
myObject.setCancelButtonText(text);
Arguments
text - (string) the cancel button's label
Returns
setTextEchoMode
Syntax
myObject.setTextEchoMode(textEchoMode);
Arguments
Returns
setFloatDecimals
Sets the number of decimals of floating values.
Syntax
myObject.setFloatDecimals(decimals);
Arguments
decimals - (integer) the number of decimals of floating values
Returns
setIntegerStep
Sets the integer step value.
Syntax
myObject.setIntegerStep(step);
Arguments
step - (integer) the integer step value
Returns
setMaximum
Syntax
myObject.setMaximum(maximum);
Arguments
maximum - (mixed) the maximum value
Returns
setMinimum
Syntax
myObject.setMinimum(minimum);
Arguments
minimum - (mixed) the minimum value
Returns
setRange
Sets the minimum and maximum values.
Syntax
myObject.setRange(minimum, maximum);
Arguments
minimum - (mixed) the minimum value
maximum - (mixed) the maximum value
Returns
Syntax
myObject.setRange(inputType);
Arguments
Returns
setValue
Syntax
myObject.setValue(value);
Arguments
value - (mixed) the value
Returns
setItems
Sets the items that can be choosen from.
Syntax
myObject.setItems(items);
Arguments
items - (array) the items that can be choosen from
Returns
setItemsEditable
Sets the items as editable.
Syntax
myObject.setItemsEditable(itemsEditable);
Arguments
itemsEditable - (boolean) should the item list be editable
Returns
value
Syntax
Returns
show
Show the window. (non-blocking)
Use the OnClosed event to know when the window has been closed.
Syntax
Returns
showModal
Show the window. (blocking)
Syntax
Returns
Events
onClosed
Called when the window is closed.
Syntax
myObject.onClosed = function(result) {};
Arguments
result - (integer) the window result (0 means that it has been canceled)
Example
myObject.onClosed = function(result)
{
if(result)
{
//Event action
}
};
onValueChanged
Called when the value changes.
Syntax
myObject.onValueChanged = function(value) {};
Arguments
value - (mixed) the current value
Example
myObject.onValueChanged = function(value)
{
//Event action
};
Attributes
title
The window's title. (string)
position
The window's position. (Point)
opacity
The window's opacity. (float)
enabled
The window's enabled status. (boolean)
visible
The window's visible status. (boolean)
value
The window's value. (mixed)
Enumerations
Values
TextEchoMode
Values
Normal: normal text display
NoEcho: do not show the text
Password: show password characters instead of the typed characters
PasswordEchoOnEdit: show password characters instead of the typed characters only when editing