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 66. 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 Component Design Guide.
This component provides the look and feel for user editable text, data binding, and focus events.| Name | Type (tag) | Type (js) | Default | Category |
|---|---|---|---|---|
height
|
expression | any | 26 | read/write |
| The height of the edit text box, default: 24. | ||||
maxlength
|
number | Number | null | read/write |
| The maximum number of chars that can be entered. | ||||
multiline
|
expression | any | false | initialize-only |
| Set to true for multiple lines, default: false. | ||||
password
|
expression | any | false | initialize-only |
| Set to true for a password field. Text will appear as ****, default: false. | ||||
pattern
|
string | String | read/write | |
| A regular expression describing set of characters allowed in this field. Restrict the characters that can be entered to a pattern specified by a regular expression. Currently only the expression [ ]* enclosing a set of characters or character ranges, preceded by an optional "^", is supported. examples: [0-9]* , [a-zA-Z0-9]*, [^0-9]* | ||||
resizable
|
expression | any | initialize-only | |
| Set to true if you plan to change the width or height of the component at run-time, default: false. | ||||
text
|
text | String | read/write | |
| The text that appears in the component. | ||||
text_y
|
number | Number | multiline ? 2 : Math.round(((this.height - this.field.getTextHeight())/2)) | read/write |
| the y position of the text. default: centered, unless it is mutltiline | ||||
width
|
expression | any | 106 | read/write |
| The width of the edit text box, default: 106. | ||||
changed, ignoreform, rollbackvalue, submit, submitname, value
doesenter, enabled, hasdefault, isdefault, style, styleable, text
aaactive, aadescription, aaname, aasilent, aatabindex, align, bgcolor, cachebitmap, clickable, clickregion, clip, contextmenu, cursor, fgcolor, focusable, focustrap, font, fontsize, fontstyle, frame, framesloadratio, hassetheight, hassetwidth, height, layout, loadratio, mask, opacity, pixellock, playing, proxyurl, resource, resourceheight, resourcewidth, rotation, showhandcursor, source, stretches, subviews, totalframes, unstretchedheight, unstretchedwidth, valign, visibility, visible, width, x, xoffset, y, yoffset
classroot, cloneManager, datapath, defaultplacement, id, ignoreplacement, immediateparent, inited, initstage, name, nodeLevel, options, parent, placement, subnodes
Methods
| clearText() |
|---|
| getText() |
|---|
| getValue() |
|---|
| setSelection() |
|---|
| Parameter Name | Type | Description |
|---|---|---|
| start | Number | The beginning of the text selection, or the position for the text cursor if no end is given. The index is 0 based. |
| end | Number | The end of the text selection. Optional. If not given, then the text cursor is positioned at the start point, but no text is selected. |
| updateText() |
|---|
commit, destroy, findForm, init, rollback, setChanged, setValue, toXML
acceptValue, doEnterDown, doEnterUp, doSpaceDown, doSpaceUp, presentValue, setStyle, setTint, updateDefault
bringToFront, containsPt, getAttributeRelative, getBounds, getColor, getColorTransform, getContextMenu, getCurrentTime, getDepthList, getID3, getMouse, getNextSelection, getPan, getPrevSelection, getProxyURL, getTotalTime, getVolume, init, measureHeight, measureWidth, play, proxyurl, releaseLayouts, searchSubviews, seek, sendAAEvent, sendBehind, sendInFrontOf, sendToBack, setAAActive, setAADescription, setAAName, setAASilent, setAATabIndex, setAccessible, setAlign, setAttributeRelative, setBGColor, setClickable, setColor, setColorTransform, setContextMenu, setCursor, setHeight, setLayout, setOpacity, setPan, setPlay, setProxyPolicy, setProxyURL, setResource, setResourceNumber, setRotation, setShowHandCursor, setSource, setValign, setVisibility, setVisible, setVolume, setWidth, setX, setXOffset, setY, setYOffset, shouldYieldFocus, stop, stretchResource, unload, updateResourceSize
animate, applyConstraint, applyConstraintMethod, applyData, childOf, completeInstantiation, construct, createChildren, dataBindAttribute, destroy, determinePlacement, getAttribute, getOption, getUID, init, lookupSourceLocator, releaseConstraint, releaseConstraintMethod, searchImmediateSubnodes, searchSubnodes, setData, setDatapath, setOption, setSelected, updateData
Events
onaddsubview, onblur, onclick, ondblclick, onerror, onfocus, onframe, onframesloadratio, onheight, onkeydown, onkeyup, onlastframe, onload, onloadratio, onmousedown, onmousedragin, onmousedragout, onmouseout, onmouseover, onmouseup, onmouseupoutside, onopacity, onplay, onremovesubview, onstop, ontimeout, onvisible, onwidth, onx, ony
Copyright © 2002-2008 Laszlo Systems, Inc. All Rights Reserved. Unauthorized use, duplication or distribution is strictly prohibited. This is the proprietary information of Laszlo Systems, Inc. Use is subject to license terms.