Name

baseedittext

Synopsis

LZX: baseedittext
JavaScript: baseedittext
Type: Class
Access: public
Topic: Incubator.Components
Declared in: lps/components/incubator/baseedittext.lzx

Description

This component provides the look and feel for user editable text, data binding, and focus events.

Superclass Chain

node (LzNode) » view (LzView) » basecomponent » basevaluecomponent » baseformitem » baseedittext

Known Subclasses

Details

Properties (9)

fontsize
<attribute name="fontsize" value="13" />
public var fontsize;
Font size of the text. Default is 13.
height
<attribute name="height" value="20" />
public var height;
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" />
public var multiline;
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" />
public var text : html;
The text that appears in the component. Text and value are the same.
value
<attribute name="value" value="null" />
public var value;
The text that appears in the component. Text and value are the same.
width
<attribute name="width" value="106" />
public var width;
The width of the edit text box, default: 106.

Methods (10)

clearText()
<method name="clearText" args="isinitvalue" />
public function clearText(isinitvalue : Boolean);
Clears the text field.
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" />
public event 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=" getSelectionPosition " />
  <method name=" getSelectionSize " />
  <method name=" getText " />
  <method name=" getValue " />
  <event name=" onvalue " />
  <method name=" setMaxlength " args="n" />
  <method name=" setPattern " args="r" />
  <method name=" setSelection " args="start, end" />
  <method name=" setText " args="t, isinitvalue" />
  <method name=" setValue " args="value, isinitvalue, _ignorecalldown" />
</class>

JavaScript Synopsis

public baseedittext extends  baseformitem  {
  public var fontsize ;
  public var height ;
  public var maxlength  : Number;
  public var multiline ;
  public final var password ;
  public var pattern  : String;
  public var text  : html;
  public var value ;
  public var width ;
  prototype public function clearText (isinitvalue : Boolean);
  prototype public function getSelectionPosition ();
  prototype public function getSelectionSize ();
  prototype public function getText () : String;
  prototype public function getValue () : String;
  prototype public event onvalue ;
  prototype public function setMaxlength (n);
  prototype public function setPattern (r);
  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);
}