This class is used for non-editable text fields (as opposed to
tagname inputtext
. A text field can be initalized
with text content at compile time.
<canvas height="30"> <text>Hello world!</text> </canvas>
Note that certain attributes on text objects, such as opacity and rotation, only work on embedded fonts. They do not work on client fonts (also called platform fonts, native fonts, platform fonts, etc). See the Developer's Guide for details.
Initial Attributes (9)
Initial Attributes are given as attributes in LZX but are not generally available as properties in JavaScript.
width
and height
are
virtual properties -- they have setters and getters, but the actual
state is stored in the text sprite. They are documented in the superclass, LzView, as well.
height
: The height of the text field. A Number. If unspecified,
then the height of the text field will be set
by default to enclose the initial text value.
width
: The width of the text field. A Number. If width is not explicitly
supplied, the text field will by default be sized to fit the width of
the initial text value.
Properties (8)
multiline
is a misnomer. Unwrapped text
can be multiple lines if it contains a <br />
or <p>
element, or a line break within a <pre>
element.
This attribute defaults to true if width and height are
explicitly specified.
If you set multiline=true, you probably want to explicitly a
width for the text also; if multiline=true and you do not specify
a width, the system will pick an arbitrary width (100 pixels at
the moment).
When multiline=true, the text is automatially re-wrapped whenever
the content is modified by calls to setText
, or whenever the
width of the text view is modified.
Setters (11)
Setters for virtual properties, to be used with setAttribute. A setter may or may not have a corresponding getter method; consult the Methods list in this section.
Methods (40)
Events (5)
Copyright © 2002-2007 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.