List Component

The List component is a scrollable single- or multiple-selection list box. You add the items displayed in the list by using the Values dialog box that appears when you click in the labels or data parameter fields. You can also use the List.addItem() and List.addItemAt() methods to add items to the list.

The List component uses a zero-based index, where the item with index 0 is the top item displayed. When adding, removing, or replacing list items using the List class methods and properties, you may need to specify the index of the list item.

AC_FL_RunContent( ‘codebase’,'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0′,’width’,’120′,’height’,’120′,’src’,’../c-image/list’,'quality’,'high’,'pluginspage’,'http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash’,'movie’,’../c-image/list’ ); //end AC code

Below are parameters, properties, events and methods of List component. If you want to learn how to use List component in Sothink SWF Easy, you may link to page Use List.

1. Initialization Parameters:

Parameter Description Property Value Default Value
data An array of values that populate the data of the list. an array of values [] (an empty array)
labels An array of text values that populate the label values of the list. an array of values [] (an empty array)
multipleSelection Indicates whether you can select multiple values (true) or not (false). Boolean false
rowHeight Indicates the height, in pixels, of each row. number 20

 

2. Properties:

Property Description
dataProvider The source of the list items.
hPosition The horizontal position of the list.
length The number of items in the list. This property is read-only.
hScrollPolicy Indicates whether the horizontal scroll bar is displayed (“on”) or not (“off”).
maxHPosition The number of pixels the list can scroll to the right, when hScrollPolicy is set to “on”.
multipleSelection Indicates whether multiple selection is allowed in the list (true) or not (false).

 

3. Events:

Event Description
scroll Broadcast when any part of the scroll bar is clicked.
resize Broadcast when an object has been resized.

 

4. Methods:

Method Property Description
setScrollProperties (pageSize, minPos, maxPos) Sets the scroll range of the scroll bar and the size of the text field that the scroll bar is attached to.
setStyle (propertyName, propertyValue) Sets the style property on the style declaration or object.
setSize (width, height, noEvent) Resizes the object to the requested size.

 

For List component, method setStyle has many properties settings.

propertyName propertyValue Description Default Value
themeColor color value The base color scheme of a component. 0×0
backgroundColor color value The background color of the list. 0xffffff
borderColor color value The border color of the list. 0×999999
color color value The text color. 0×0
disabledColor color value The color for text when the component is disabled. 0xcbcbcb
embedFonts color value A Boolean value that indicates whether the font specified in fontFamily is an embedded font. This style must be set to true if fontFamily refers to an embedded font. Otherwise, the embedded font is not used. If this style is set to true and fontFamily does not refer to an embedded font, no text is displayed. false
fontFamily font name The font name for text. _sans
fontSize font size The point size for the font. 12
fontStyle “normal” or “italic” The font style. normal
fontWeight “none”, “bold” The font weight. none
textDecoration “none, “underline” The text decoration. none
textAlign “left”, “right” or “center” The text alignment. left
textIndent number A number indicating the text indent. 1
rollOverColor color value The background color of a rolled-over row. 0xcccccc
selectionColor color value The background color of a selected row. 0xaaaaaa

 

 

 

 

List Component