For more information on attributes in general, see an introduction to attributes. This document provides details on the attribute reference section which appears below the general description of each LZX element.
For an XML attribute (an attribute "Tag" listed in its Usage column), the value of an attribute can be supplied as the value of an attribute in the XML header. For example, the view tag is declared as having an x attribute. The following code will initialize the x attribute of the view named "myview" to
<view name="myview" x="10"/>
Most attributes can also be set using the attribute element. (Exceptions are the id and resource attributes, and attributes of elements that do not correspond to LFC classes, such as font.) For example, the previous example could also be written:
<view name="myview">
<attribute name="x" value="10"/>
</view>
The name of the attribute.
Describes whether an attribute may occur in an XML open tag, in JavaScript code that manipulates the properties of an object, or both.
The XML type name of the attribute.
| black | 000000 | |
| green | 008000 | |
| silver | C0C0C0 | |
| lime | 00FF00 | |
| gray | 808080 | |
| olive | 808000 | |
| white | FFFFFF | |
| yellow | FFFF00 | |
| maroon | 800000 | |
| navy | 000080 | |
| red | FF0000 | |
| blue | 0000FF | |
| purple | 800080 | |
| teal | 008080 | |
| fuchsia | FF00FF | |
| aqua | 00FFFF |
JavaScript types start with a capital letter. These may be one of the native JavaScript types, listed below or an LZX class.
|
Native JavaScript types (See ECMA-262 standard for more detail on these types) |
||
|
|
Boolean |
true or false |
|
|
String |
single or double quotes may be used to specify a sequence of characters (e.g. var s = 'test' or var s = "test" |
|
|
Number |
used to specify simple values (e.g. var n = 4 or var n=4.2). Number type is also commonly used to specify a color, for which it is often convenient to use hexadecimal notation (e.g. var c = 0xFFFFFF for white, or 0x0099BB for turquoise) |
|
|
Array |
an ordered list of elements. The elements may be of any type and need not be of the same type. |
|
Notes on documentation: |
||
|
|
[LzNode] |
An LZX class enclosed in brackets indicates an Array of these types. |
|
|
dictionary |
Also known as a hash, or JavaScript Object, the dictionary type indicates an unordered collection of name-value pairs. For example: {width:100, height:50, title:"my title"} |
|
|
any |
JavaScript APIs will often allow a parameter of any type. This is indicated by the word "any" in the type collumn. |
Clicking on the name of the category will take you to a description of that category. Here is a complete list of attribute types.
Copyright © 2002-2005 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.