[]
        
(Showing Draft Content)

IListBoxItemCollection

Interface IListBoxItemCollection

All Superinterfaces:
IItemCollection<ListBoxItem>, Iterable<ListBoxItem>

public interface IListBoxItemCollection extends IItemCollection<ListBoxItem>
Represents a collection of selected ListBoxItem objects in a IListBox.

This interface preserves the ListBoxItem type information for IItemCollection members and is typically returned by IListBox.getSelectedItems() to expose the current selection in a list box.


 IListBox listBox = worksheet.getControls().addListBox(50, 100, 120, 80);
 listBox.getItems().add(new ListBoxItem("Apple"));
 listBox.getItems().add(new ListBoxItem("Orange"));
 listBox.setSelectionMode(SelectionMode.Extended);
 IListBoxItemCollection selectedItems = listBox.getSelectedItems();
 int count = selectedItems.getCount();