Description
This component provides the look and feel for user editable text, data
binding, and focus events.
Details
Properties (9)
-
fontsize
-
<attribute name="fontsize" value="13" />
Font size of the text. Default is 13.
-
height
-
<attribute name="height" value="20" />
The height of the edit text box, default: 20.
-
maxlength
-
<attribute name="maxlength" type="number" value="null" />
public var maxlength : Number;
The maximum number of chars that can be entered. Default is
unlimited.
-
multiline
-
<attribute name="multiline" value="false" />
Set to true for multiple lines. Default is false.
-
password
-
<attribute name="password" value="false" />
public final var password;
Set to true for a password field. Text will appear as ****.
This attribute cannot be changed at runtime.
Default: false.
-
pattern
-
<attribute name="pattern" type="string" value="$once{null}" />
public var pattern : String;
An expression to restrict the set of characters that are allowed
to be entered. For example, [0-9]*, [012]*, [a-zA-Z]*,
[0-9A-Z]*. You can restrict the number of characters using
maxlength. Default is any character.
-
text
-
<attribute name="text" type="html" />
The text that appears in the component. Text and value are the
same.
-
value
-
<attribute name="value" value="null" />
The text that appears in the component. Text and value are the
same.
-
width
-
<attribute name="width" value="106" />
The width of the edit text box, default: 106.
Methods (10)
-
clearText()
-
<method name="clearText" args="isinitvalue" />
public function clearText(isinitvalue : Boolean);
-
getSelectionPosition()
-
<method name="getSelectionPosition" />
public function getSelectionPosition();
Get the current selection position.
-
getSelectionSize()
-
<method name="getSelectionSize" />
public function getSelectionSize();
Get the current selection size.
-
getText()
-
<method name="getText" />
public function getText() : String;
Returns the text displayed in this component. The same as calling
getValue(false).
-
getValue()
-
<method name="getValue" />
public function getValue() : String;
Returns string displayed in this component. Also see getText().
-
setMaxlength()
-
<method name="setMaxlength" args="n" />
public function setMaxlength(n);
-
setPattern()
-
<method name="setPattern" args="r" />
public function setPattern(r);
-
setSelection()
-
<method name="setSelection" args="start, end" />
public function setSelection(start : Number, end : Number);
Positions the text selection within the text field. If this object
does not already have the focus, this has the ancillary effect of
giving it the focus.
-
setText()
-
<method name="setText" args="t, isinitvalue" />
public function setText(t : String, isinitvalue : Boolean);
Set text. Wraps setValue().
-
setValue()
-
<method name="setValue" args="value, isinitvalue, _ignorecalldown" />
public function setValue(value : String, isinitvalue : Boolean, _ignorecalldown);
Set the value (text) of baseedittext.
Events (1)
-
onvalue
-
<attribute name="onvalue" />
Sent when the value of the text changes.
LZX Synopsis
<class name="
baseedittext" extends="
baseformitem
">
<attribute name="
fontsize
" value="
13" />
<attribute name="
height
" value="
20" />
<attribute name="
maxlength
" type="
number" value="
null" />
<attribute name="
multiline
" value="
false" />
<attribute name="
password
" value="
false" />
<attribute name="
pattern
" type="
string" value="
$once{null}" />
<attribute name="
text
" type="
html" />
<attribute name="
value
" value="
null" />
<attribute name="
width
" value="
106" />
<method name="
clearText
" args="
isinitvalue" />
<method name="
setText
" args="
t,
isinitvalue" />
<method name="
setValue
" args="
value,
isinitvalue,
_ignorecalldown" />
</class>
JavaScript Synopsis
public
baseedittext extends
baseformitem
{
prototype public function
clearText
(
isinitvalue : Boolean);
prototype public function
getText
() :
String;
prototype public function
getValue
() :
String;
prototype public function
setSelection
(
start : Number,
end : Number);
prototype public function
setText
(
t : String,
isinitvalue : Boolean);
prototype public function
setValue
(
value : String,
isinitvalue : Boolean,
_ignorecalldown);
}