<edittext>

text input component with lz components look and feel

JavaScript: edittext

Extends Baseformitem

The edittext tag provides a text input field which has a look and feel to match the lz component set. It can accept any <inputtext> attribute.

Example 1. Simple edittext
<canvas bgcolor="blue" height="60" >
  <edittext width="200" x="20" y="20">default text goes here</edittext>
</canvas>

For details on how this component is constructed see the edittext section of the Guide.

Attributes
Name Usage Type (Tag) Type (JS) Default Category
maxlength Tag & JS number Number null setter
 

The maximum number of chars that can be entered.


multiline Tag only expression false final
 

Set to true for multiple lines, default: false.


password Tag only expression false final
 

Set to true for a password field. Text will appear as ****, default: false.


pattern Tag & JS string String   setter
 

An expression for a set of characters to restrict entry to.


resizable Tag only expression   final
 

Set to true if you plan to change the width or height of the component at run-time, default: false.


text_y Tag & JS number Number   setter
 

the y position of the text. default: centered, unless it is mutltiline



Attributes inherited from Basecomponent

doesenter, enabled, hasdefault, isdefault, style, styleable, text

Attributes inherited from Baseformitem

changed, ignoreform, onchanged, onvalue, rollbackvalue, submit, submitname

Attributes inherited from Basevaluecomponent

value

Attributes inherited from Node

class, classroot, cloneManager, datapath, id, ignoreAttribute, ignoreplacement, immediateparent, initstage, name, nodeLevel, onconstruct, oninit, parent, placement, subnodes

Attributes inherited from View

aaactive, aadescription, aaname, aasilent, aatabindex, align, bgcolor, clickable, clickregion, clip, cursor, defaultplacement, fgcolor, focusable, focustrap, font, fontsize, fontstyle, frame, framesloadratio, hassetheight, hassetwidth, height, layout, loadratio, mask, onblur, onclick, ondata, ondblclick, onfocus, onkeydown, onkeyup, onmousedown, onmouseout, onmouseover, onmouseup, onselect, opacity, options, pixellock, play, resource, resourceheight, resourcewidth, rotation, selectiontype, showhandcursor, source, stretches, subviews, totalframes, unstretchedheight, unstretchedwidth, valign, visible, width, x, xoffset, y, yoffset


Methods

clearText()
edittext.clearText()

Clears the text field.



getText()
edittext.getText()

Returns the string displayed in this component, like getValue().

Returns
Type Desc
String the string displayed.


getValue()
edittext.getValue()

Returns string displayed in this component, like getText().

Returns
Type Desc
String the string displayed.


setMaxlength()
edittext.setMaxlength(n)
Parameters
Name Type Desc
n None


setPattern()
edittext.setPattern(r)
Parameters
Name Type Desc
r None


updateText()
edittext.updateText()


Methods inherited from basecomponent

doEnterDown, doEnterUp, doSpaceDown, doSpaceUp, setStyle, setTint, updateDefault

Methods inherited from baseformitem

applyData, commit, findForm, init, rollback, setChanged, setValue, toXML, updateData

Methods inherited from basevaluecomponent

getValue

Methods inherited from LzNode

animate, applyConstraint, childOf, completeInstantiation, createChildren, dataBindAttribute, destroy, determinePlacement, getAttribute, getOption, getUID, lookupSourceLocator, searchImmediateSubnodes, searchSubnodes, setAttribute, setDatapath, setID, setName, setOption

Methods inherited from LzView

addProxyPolicy, addSubview, bringToFront, construct, containsPt, getAttributeRelative, getBounds, getColor, getColorTransform, getContextMenu, getCurrentTime, getDepthList, getHeight, getID3, getMouse, getPan, getTotalTime, getVolume, getWidth, measureHeight, measureWidth, play, releaseLayouts, removeProxyPolicy, searchParents, searchSubviews, seek, sendBehind, sendInFrontOf, sendToBack, setAAActive, setAADescription, setAAName, setAASilent, setAATabIndex, setAlign, setAttributeRelative, setBGColor, setClickable, setColor, setColorTransform, setContextMenu, setCursor, setHeight, setLayout, setOpacity, setPan, setPlay, setResource, setResourceNumber, setRotation, setShowHandCursor, setSource, setValign, setVisible, setVolume, setWidth, setX, setY, shouldYieldFocus, stop, stretchResource, unload, updateResourceSize


Events

Events inherited from LzNode

onconstruct, ondata, oninit

Events inherited from LzView

onaddsubresource, onaddsubview, onblur, onclick, ondblclick, onerror, onfocus, onframe, onheight, onlastframe, onload, onmousedown, onmousedragin, onmousedragout, onmouseout, onmouseover, onmouseup, onmouseupoutside, onopacity, onplay, onremovesubview, onstop, ontimeout, onwidth, onx, ony