ListBox.ItemSelected

Syntax

ItemSelected: function (sender, args)

Parameters

sender. Event source.

args. Event information.

Description

The ItemSelected event is fired on selecting a list item.

Example

To execute the example, create the ListBox component (see Example of Creating the ListBox Component) named listbox. Add the ItemSelected event handler:

listbox.ItemSelected.add(function(sender, args)

{

    confirm(listbox.getSelectedItem().getContent());

});

After executing the example the HTML page contains the list of items displayed on the Example of Creating the ListBox Component page. On selecting list elements, a message that shows element content appears on the screen.

See also:

ListBox