Class Text
Object
|
+--Widget
|
+--Text
-
Direct Known Subclasses:
-
ValidatingText
- class
Text
- extends Widget
Raises:
change
- when the text widget's contents changes. Event listeners are passed a reference to the widget that changed.
Defined in form_widgets.js
Constructor Summary |
Text
(unused1, unused2, unused3, <boolean> password)
Creates a traditional one-line text field.
|
Method Summary |
int
|
getMaxLength()
Returns the maximum number of characters that
can be displayed in this text widget.
|
string
|
getText()
Returns the text currently displayed in the text
widget.
|
void
|
setMaxLength(<int> len)
Limits the text widget to len characters.
|
void
|
setText(<string> text)
Sets the text widget's contents to text .
|
Methods inherited from class Widget |
installContextMenu, installDefaultContextMenu, uninstallContextMenu, isDraggable, setDraggable, addEventListener, blur, createEventTable, dispose, focus, getAbsoluteBottom, getAbsoluteLeft, getAbsoluteRight, getAbsoluteTop, getBottom, getBounds, getClientHeight, getClientWidth, getCorner, getHeight, getLeft, getPixelsPerEm, getRight, getToolTip, getTop, getWidth, isDisposed, isEnabled, layout, moveToAbsolute, moveTo, raiseEvent, registerEventType, removeEventListener, setAbsoluteBottom, setAbsoluteLeft, setAbsoluteRight, setAbsoluteTop, setBottom, setBounds, setEnabled, setHeight, setLeft, setRight, setToolTip, setTop, setWidth, setParent, toString
|
Text
function Text(unused1, unused2, unused3, <boolean> password)
Creates a traditional one-line text field.
It can also be used to create password text fields.
Parameters:
unused1
- this parameter is deprecated
unused2
- this parameter is deprecated
unused3
- this parameter is deprecated
password
- if true
then the resulting text field will have the password flag set so that typed-in text is obfuscated
getMaxLength
int getMaxLength()
Returns the maximum number of characters that
can be displayed in this text widget.
Returns:
the maximum number of displayable characters for this text widget
getText
string getText()
Returns the text currently displayed in the text
widget.
Returns:
the text widget's current contents
setMaxLength
void setMaxLength(<int> len)
Limits the text widget to len
characters.
Pass -1 to set the maximum to unbounded.
Parameters:
len
- the maximum number of characters that can be displayed in the text widget
setText
void setText(<string> text)
Sets the text widget's contents to text
.
Parameters:
text
- the new contents of the text widget
