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 56. Simple edittext
<canvas
bgcolor
="blue
" height
="60
">
<edittext
width
="200
" x
="20
" y
="20
">default text goes here
</edittext
>
</canvas
>
Name (CSS property) | Type (tag) | Type (js) | Default | Category |
---|---|---|---|---|
height
|
expression | any | 26 | read/write |
The height of the edit text box. | ||||
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. | ||||
password
|
expression | any | false | initialize-only |
Set to true for a password field. Text will appear as ****. | ||||
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 | false | initialize-only |
Set to true if you plan to change the width or height of the component at run-time. | ||||
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. |
changed, ignoreform, rollbackvalue, submit, submitname, value
doesenter, enabled, hasdefault, isdefault, style, styleable, text
aaactive, aadescription, aaname, aasilent, aatabindex, align, backgroundrepeat, bgcolor, cachebitmap, capabilities, clickable, clickregion, clip, colortransform, context, contextmenu, cornerradius, cursor, fgcolor, focusable, focustrap, font, fontsize, fontstyle, frame, framesloadratio, hasdirectionallayout, hassetheight, hassetwidth, height, layout, loadratio, mask, opacity, pixellock, playing, proxyurl, resource, resourceheight, resourcewidth, rotation, shadowangle, shadowblurradius, shadowcolor, shadowdistance, showhandcursor, source, stretches, subviews, tintcolor, totalframes, unstretchedheight, unstretchedwidth, usegetbounds, valign, visibility, visible, width, x, xoffset, xscale, y, yoffset, yscale
classroot, cloneManager, data, datapath, defaultplacement, id, ignoreplacement, immediateparent, inited, initstage, name, nodeLevel, options, parent, placement, styleclass, subnodes, transition
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, getCurrentTime, getDepthList, getDisplayObject, getID3, getMouse, getNextSelection, getPan, getPrevSelection, getProxyURL, getTotalTime, getVolume, init, isBehind, isInFrontOf, isMouseOver, measureHeight, measureWidth, play, proxyurl, searchSubviews, seek, sendAAEvent, sendBehind, sendInFrontOf, sendToBack, setAccessible, setAttributeRelative, setColor, setColorTransform, setPan, setProxyPolicy, setSource, setVolume, shouldYieldFocus, stop, unload, updateResourceSize
animate, applyConstraintMethod, applyData, childOf, completeInstantiation, construct, createChildren, dataBindAttribute, destroy, determinePlacement, getOption, getUID, init, lookupSourceLocator, releaseConstraint, releaseConstraintMethod, searchImmediateSubnodes, searchSubnodes, setOption, setSelected, updateData
Events
onaddsubview, onbackgroundrepeat, onblur, onclick, onclickable, onclip, oncontext, oncornerradius, ondblclick, onerror, onfocus, onframe, onframesloadratio, ongesture, onheight, onkeydown, onkeyup, onlastframe, onload, onloadratio, onmousedown, onmousedragin, onmousedragout, onmouseout, onmouseover, onmousetrackout, onmousetrackover, onmousetrackup, onmouseup, onmouseupoutside, onopacity, onplay, onplaying, onremovesubview, onshadowangle, onshadowblurradius, onshadowcolor, onshadowdistance, onstop, ontimeout, ontouch, onvisible, onwidth, onx, ony
Copyright © 2002-2010 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.