BiListItem

This class is used for the items in a list

This class extends BiLabel and therefore all methods and fields available for BiLabel are also available for BiListItem .

Constructor

new BiListItem ( [ sText [ ,oUserValue ] ] )

Parameters

NameTypeOptionalDefaultDescripton
sTextStringcheckedThe text to show on the list item
oUserValueObjectcheckedThe user value of the item

Properties

NameTypegetsetDescripton
indexNumbercheckedReturns the index of the item in the parent's children collection.
selectedBooleancheckedcheckedWhether the item is selected or not
userValueObjectcheckedcheckedA value associated with the list item. This is not the text on the item. To change the text use the text property.
visibleBooleancheckedWhether the item is visible or not. Note that all the ancestors must be visible for the component to be actually shown. Use isVisible to check that the item is shown.

Methods

NameDescription
matchesStringTests whether the beginning of the text of the item starts with the given string. This match is case insensitive.
matchesStringExactTests whether the text of the item matches the given string. This match is case insensitive.

Events

NameTypeBubblesDescripton
actionBiEventThis event is fired when the item is double clicked or when enter is pressed
changeBiEventThis event is fired when the item is selected or another item is selected

Static Methods

None.

Static Fields

None.

Remarks

Do not change the location of the list item or the layout of the list might be corrupted. The width should not be changed either. The height can be changed without breaking the layout. If the list item has a command the command will be executed when the user double clicks the item (or presses enter when the item is selected).

Method Details

matchesString

Tests whether the beginning of the text of the item starts with the given string. This match is case insensitive.

Syntax

object.matchesString ( sText )

Parameters

NameTypeOptionalDefaultDescripton
sTextStringThe text to search for

Return Type

Boolean

matchesStringExact

Tests whether the text of the item matches the given string. This match is case insensitive.

Syntax

object.matchesStringExact ( sText )

Parameters

NameTypeOptionalDefaultDescripton
sTextStringThe text to search for

Return Type

Boolean