A single item in a list.

Constructor

new (?parent:DisplayObjectContainer, ?xpos:Float, ?ypos:Float, ?data:Dynamic)

Constructor

Parameters:

parent

The parent DisplayObjectContainer on which to add this ListItem.

xpos

The x position to place this component.

ypos

The y position to place this component.

data

The string to display as a label or object with a label property.

Variables

data:Dynamic

Sets/gets the string that appears in this item.

defaultColor:UInt

Sets/gets the default background color of list items.

rolloverColor:UInt

Sets/gets the rollover background color of list items.

selected:Bool

Sets/gets whether or not this item is selected.

selectedColor:UInt

Sets/gets the selected background color of list items.

Methods

draw ():Void

Draws the visual ui of the component.

get_data ():Dynamic

get_selected ():Bool

set_data (value:Dynamic):Dynamic

set_defaultColor (value:UInt):UInt

set_rolloverColor (value:UInt):UInt

set_selected (value:Bool):Bool

set_selectedColor (value:UInt):UInt

Inherited Variables

Defined by Component

enabled:Bool

Sets/gets whether this component is enabled or not.

tag:Int

Sets/gets in integer that can identify the component.

Inherited Methods

Defined by Component

get_enabled ():Bool

get_height ():Float

get_tag ():Int

get_width ():Float

move (xpos:Float, ypos:Float):Void

Moves the component to the specified position.

Parameters:

xpos

the x position to move the component

ypos

the y position to move the component

setSize (w:Float, h:Float):Void

Sets the size of the component.

Parameters:

w

The width of the component.

h

The height of the component.

set_enabled (value:Bool):Bool

set_height (value:Float):Void

Sets/gets the height of the component.

set_tag (value:Int):Int

set_width (value:Float):Void

Sets/gets the width of the component.

set_x (value:Float):Void

Overrides the setter for x to always place the component on a whole pixel.

set_y (value:Float):Void

Overrides the setter for y to always place the component on a whole pixel.