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
| Name | Type | Optional | Default | Descripton |
sText |
String |
![]() |
The text to show on the list item | |
oUserValue |
Object |
![]() |
The user value of the item |
Properties
| Name | Type | get | set | Descripton |
index |
Number |
![]() |
Returns the index of the item in the parent's
children collection. |
|
selected |
Boolean |
![]() |
![]() |
Whether the item is selected or not |
userValue |
Object |
![]() |
![]() |
A value associated with the list item. This is not the text on the item. To
change the text use the text
property. |
visible |
Boolean |
![]() |
Whether 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
| Name | Description |
matchesString |
Tests whether the beginning of the text
of the item starts with the given string. This match is case insensitive. |
matchesStringExact |
Tests whether the text
of the item matches the given string. This match is case insensitive. |
Events
| Name | Type | Bubbles | Descripton |
action |
|
This event is fired when the item is double clicked or when enter is pressed |
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
| Name | Type | Optional | Default | Descripton |
sText |
String |
The 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
| Name | Type | Optional | Default | Descripton |
sText |
String |
The text to search for |
Return Type
Boolean
