RasterList( [parent [, displayMode [, thumbsize]]] )
Creates a list control. List controls take the entire area of their
parent container. The following example creates a grid list control
inside a document element with an
id
of "listDiv":
var list = new RasterList( "listDiv", "grid" );
list.add( null, ICONS32.GRAPHICS, null, "Customize" );
list.add( null, ICONS32.ADDRESS_BOOK, null, "Addresses" );
list.add( null, ICONS32.AUDIO_VOL_HIGH, null, "Sounds" );
list.add( null, ICONS32.ACCESSORIES, null, "Accessories" );
...
Parameters
Name |
Type |
|
Description |
parent |
object |
optional |
A string containing the ID of a DOM element,
a DOM element object, or another #Control object.
If this argument is null , the list is created but not
attached to the DOM herarchy; RasterControl.setParent() must
be invoked later to specify the parent container. |
displayMode |
string |
optional |
Specifies how the list render its items. Possible
values include:
- "list" (default) - Items are display in a single column
and tiled vertically. A 16x16 icon shows to the left
of the text.
- "grid" - Items are display in a grid-like
pattern. Icon shows above the text. Text might wrap
to a maximum of two lines and any overflow left is hidden.
- "thumbs" - Items are display in a grid-like
pattern. Thumbnail image shows above the text. Text might wrap
to a maximum of three lines and any overflow left is hidden.
- "table" - Items are display as rows in a table.
A 16x16 icon shows to the left of the first column's text.
If the item was created with a text[] array, each text element
in the array is displayed as a column.
This value is case-sensitive. If this value is omitted or
not recognized, a "list" value is assumed. |
thumbsize |
number |
optional |
Specifies the maximum width or height of a thumbnail picture.
This argument is used only when displayMode is
"thumbs". If not given, this value defaults to 80 pixels. It is
recommended the size is specified to match those from the thumbnails
to avoid a jagged pixel-resize look. |
See Also